CSS Poster
Lab notes
The experiment: A slightly interactive image montage using JS, CSS and HTML
- Follow the link above
- If you have a mouse, move it, otherwise tap around
- Enjoy watching the image tilt and stretch
Dev notes:
Theme 1: Open Graph image built in the browser
- HTML and CSS rather Photoshop to make a photo montage
- A PNG mask on a JPG and CSS to pixel push
- I screenshot my window at 1200 x 630px to get the og:image
Theme 2: 3D CSS
- The
perspectiveattribute in CSS translateXnot used in this example due to bad effect on og:image- Try with
perspective,perspective-origin,rotateYandrotateX
Theme 3: Javascript setting CSS vars
- Lea Verou demonstrated this years ago 🤩
- Track
mouseoverwith JS and update a CSS custom-property - JS should write values 0-1 and CSS should convert using
calc()