Использование атрибутов HTML в качестве значений свойств CSS [duplicate]
This question already has an answer here:
CSS3's attr() doesn't work in major browsers 4 answersВ спецификации сказано:
The attr() function returns the value of an attribute on the element for use as a value in a property. If used on a pseudo-element, it returns the value of the attribute on the pseudo-element's originating element.
http://www.w3.org/TR/css3-values/#attr
Однако это, похоже, не работает. Когда я используюbackground-image: url(attr(href));
Я получаю строку & quot; attr (href) & quot; как значение атрибута, а не само значение.
Есть идеи, почему это сломано?