I am trying to stylize the element displayed through: after

.again:after:hover 
  • This design is cut by Chromov's devult - fromillia
  • one
    because the opposite is necessary: ​​.again: hover: after - humster_spb
  • The construction does not work: .again: hover: after {...} - fromillia
  • one
    Give an example of your code and explain exactly how you want to stylize an element so that it is clear what is not working - humster_spb
  • one
    If you want to hang :hover only on :after , then you can not. - Artem Gorlachev

1 answer 1

Here is an example of how this construction works:

 .again { width: 100px; height: 50px; border: 1px solid red; position: relative; } .again:after { content: ''; display: block; width: 30px; height: 30px; border: 1px solid black; position: absolute; right: -35px; } .again:hover:after { background-color: green; } 
 <div class="again"></div>