4 ms·
How would you implement that scrolling background? Particularly the mouse interaction, where it scrolls with a dynamic speed ( depending on how far to the side
by Bewelge 1y ago
How would you implement that scrolling background? Particularly the mouse interaction, where it scrolls with a dynamic speed ( depending on how far to the side the mouse it) and even has some smooth damping when you stop scrolling.
And what part uses the visibility state? The grayscale seems to be triggered by focus which I think would be doable with CSS
- lifthrasiir 1y agoAh, I forgot that (everything except for the interaction should be okay, though). For the visibility state however, checking for focus is insufficient because you can have elements focused without the document being visible.
- jaapz 1y agoScrolling using actual scroll - instead of following the pointer and automatically scrolling - would make the page better anyway IMHO
- diggan 1y ago> How would you implement that scrolling background? At a glance I'm not sure exactly how I'd implement it, but my guess is that it's possible with some workarounds and hacks, at the very least. Here's an article showing some demos (at the bottom) on how you can make the mouse cursor affect CSS: https://css-tricks.com/how-to-map-mouse-position-in-css/ https://css-tricks.com/how-to-map-mouse-position-in-css/