In this effect, I move an image based on the mouse position. The image rotates according to the movement angle. Finally, I added a masking effect inside the image that zooms out depending on the movement speed. Let’s set it all up!
HTML Structure
The structure is very simple: we will move the card div
, which contains the image that will zoom in and out.
<section class="mwg_effect039">
<div class="card">
<img class="media" src="./assets/medias/image.png" alt="">
</div>
</section>