REVENGE.CSS icon indicating copy to clipboard operation
REVENGE.CSS copied to clipboard

Pseudo-elements on images

Open KittyGiraudel opened this issue 10 years ago • 1 comments

As far as I know, pseudo-elements do not work on replaced content. img is a replaced element, thus the ::after pseudo-element won't display anything.

More informations: http://red-team-design.com/css-generated-content-replaced-elements/.

KittyGiraudel avatar Mar 15 '14 11:03 KittyGiraudel

You are mostly right. But when images cannot be displayed, the pseudo-elements are present. So you can display a failure notice which will vanish when the image is loaded.

jensgro avatar Dec 12 '17 15:12 jensgro