3 ms·
That pixel scroll effect is so cool! How is it done?
by alexmingoia 6y ago
That pixel scroll effect is so cool! How is it done?
- monokai_nl 6y agoSo just this once I'm going to direct you to Reddit. They've tried to dissect it here: https://www.reddit.com/r/webdev/comments/b0wcrm/how_is_this_website_performing_this_scroll_effect/ https://www.reddit.com/r/webdev/comments/b0wcrm/how_is_this_...
- devilduck 6y agoOh you are just the most humble aren't you
- codethief 6y agoTL;DR Position an overlay element (in this case, a <canvas>) at the bottom of the browser viewport and draw some squares in the same color as your site's background color.
- monokai_nl 6y agoYes, correct. And this method only works because the background is the same color as the overlaid blocks and the font is monospace, so you can precisely position the blocks over the characters.