4

Is there a CSS selector for things that are in view, i.e. visible within the viewport?

P Varga
  • 19,174
  • 12
  • 70
  • 108

1 Answers1

1

You have to use Javascript to achieve that. The modern way is to use getBoundingClientRect().

k123
  • 418
  • 2
  • 5
  • 1
    I think the modern way is `IntersectionObserver`, I was just wondering if there's a pre-CSS way... – P Varga Aug 16 '20 at 08:38