I would like to do this in HTML:
<a href="http://host.com/cat.png">text</a>
and in CSS:
a {
background-image: url(attr(href));
}
It doesn't seem to work for me. Is it even possible?
I would like to do this in HTML:
<a href="http://host.com/cat.png">text</a>
and in CSS:
a {
background-image: url(attr(href));
}
It doesn't seem to work for me. Is it even possible?
Not possible in static CSS file. However you can have dynamically generated CSS by any server side language such as PHP.