I’ve been working on a website in which large pictures are displayed to the user. Instead of creating a typical lightbox effect (a zoom-in animation with a black overlay) for these large pictures, I decided to try and make something more interactive and fun. I ended up coding an image container that tilts as the user moves the mouse cursor above it.
Here’s the final version:
See the Pen MrLopq by Mihai (@MihaiIonescu) on CodePen.
This effect …
The post Animate a Container on Mouse Over Using Perspective and Transform appeared first on CSS-Tricks.