« Previous Demo: Sticky Captions Concept Back to the Codrops Article

CSS Click Events Transition hack

The transition hack

Clicking on the element will trigger the :active pseudo-class turning every element below it with the .to-be-changed class into red. A CSS transition with a pseudo-infinite delay will prevent those elements to get back to their default state.

Refreshing the page or having another element triggering the reverse effect are the only ways to restore the default state of the elements.

Demo

Click me!

I’m going to be red! It’s gonna be legen... Wait for it...