I've created a select
list with options having :after
and :before
pseudo-elements - DEMO
option:after, option::before {
content: " ";
height: 5px;
width: 5px;
background: #c00;
border-radius: 5px;
display: inline-block;
}
However this works in Firefox only and no other browser.
As it stated on W3C, MDN, SitePoint the :after
is a "pseudo-element rendered after the matched element and used to add cosmetic content" and nobody states any restriction about elements it can't be applied to.
Question - why all the browsers (except FF) can't properly display the pseudo-elements?
Any documentation is greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…