0

I want to select "::after" in an html structure like this.

<div class="test">
   <img src="test.jpg" class="lazy loaded">
   ::after
</div>

If there is a "loaded" class in the img tag, I want to hide ::after.

So something like;

img.loaded + ::after {
  display: none;
}

But there is no such selector, is there a way to select it using only css?

Mehmet S
  • 349
  • 1
  • 4
  • 18

0 Answers0