img:after {
content:attr(title);
}
This is not working, probably because the img tag is empty, no closing tag. Any workaround to fix this without js?
img
is a replaced element, and the w3c CSS 2.1 spec says:
Note. This specification does not fully define the interaction of :before and :after with replaced elements (such as IMG in HTML). This will be defined in more detail in a future specification.
I don't know about any "future specification" that took place. It does not work in Chrome, that's for sure :).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With