How to create a CSS-only overlay over images or other HTML elements? Something like this:
All examples found until now suggest assigning a background and using a mix of either masks or clip-paths over the same element, but I would like to animate the individual elements that are supposed to spotlight the image, I was thinking like this:
<div class="relative-container">
<img class="full-width-and-height-to-match-container" src="..." />
<span class="absolute-rounded-mask-big" />
<span class="absolute-rounded-mask-small" />
<span class="absolute-rounded-mask-big" />
<span class="absolute-rounded-mask-medium" />
...
</div>
All spans are supposed to be positioned across the relative inner content and display the image underneath, with some animation of x and y transitions that would make for an awesome effect.
I found some examples such as this, (scroll a little to get them) but, as per its example is using JS, something that I would like to avoid