css - Use 3 pseudo elements together? -
i want ask if possible use pseudo elements :hover
, :not()
, , :after
on same css rule
i need use 3 piece of code:
#sidebar ul:not(.sub-menu) li:hover:after{ content: ""; width:100%; height:50px; position:absolute; top:0; left:0; z-index:100; background: rgba(0,0,0,0.4); }
since have sidebar using pseudo elements cause hover effect on menu items, want avoid main menu <li>
s in hover state when sub menu <li>
hovered.
you can select easy way like:
#sidebar ul li { // styles main li }
then sub <li>
of them :
#sidebar ul li > ul li { // styles sub menu li }
Comments
Post a Comment