开发者

Pseudo-elements and images

Can an image have pseudo-elements?

In my testing I have not been able to use :before or :after with image elements, but I would love some more information.

EDIT: W3C 开发者_C百科isn't clear either unfortunately:

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.


It wouldn't really make any sense. The :before and :after insert the extra content inside the matched element, and img doesn't have an inside.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜