Show :after when hovering over the parent element via CSS

后端 未结 2 1341
栀梦
栀梦 2020-12-17 20:45

Is it possible to display:block; the :after pseudo-element when I hover over the parent element itself?

#myDiv{
   position:relativ         


        
2条回答
  •  青春惊慌失措
    2020-12-17 21:13

    Change it to #myDiv:hover::after

    You can use either :after or ::after but in the selectors module (3) it states that the latter is now intended to be used to distinguish them from pseudo-classes

提交回复
热议问题