Image Peephole Effect: Using CSS Masking in Webflow
Level:
Profi 💪
Preview result
https://webflow-lernen.webflow.io/peephole-image-mask-effect-in-webflow
Im Webflow Designer öffnen und klonen
https://preview.webflow.com/preview/webflow-lernen?utm_medium=preview_link&utm_source=designer&utm_content=webflow-lernen&preview=25ac349dc1edd443449a3691e0fb6d60&pageId=609ecc8b79a0650bb387960c&workflow=preview
Open and clone in Webflow Designer
Affiliate Link
I was looking for a solution to make a circle move across an image as a peephole so that the underlying image was visible. The circle moves on mouse movement — i.e. magnetically tracks the mouse pointer.
Since you can't influence top/left position or CSS masks in Webflow Animation, a bit of custom code must be added. I used the following external code for this: https://stackoverflow.com/questions/63227926/move-clip-path-position-to-mouse-cursor
Another useful article about CSS tricks about mask position helped me understand the whole thing:
https://css-tricks.com/almanac/properties/m/mask-position
The effect is similar to that of Vanmoof:
https://www.vanmoof.com/de-DE/s3?color=dark or on https://www.canoo.com/canoo