CSS Poster
Lab notes
The experiment: An interactive image montage using JS, CSS and HTML
- Follow the link above
- Move you mouse or tap around
- Enjoy the tilting and stretching
Dev notes:
Theme 1: build in the browser
- HTML and CSS rather Photoshop
- Mask over JPG, CSS to pixel push
- Screenshot at 1200 x 630px to generate
og:image
Theme 2: 3D CSS
- CSS
perspectiveattribute translateXnot used but fun- Try
perspective-origin,rotateYandrotateX
Theme 3: JS to set CSS vars
- Lea Verou showed this years ago 🤩
- Track
mouseoverwith JS - Update a CSS custom-property
- Write values 0-1 for simplicity
calc()to convert as needed
Further details
The code is here
The demo is here.
Enjoy!