4 ms·
Quite unrelated, but can anyone explain to me how the first picture of the Pi in it's case stays static on the page until you scroll past a certain point (aroun
by Dogamondo 13y ago
Quite unrelated, but can anyone explain to me how the first picture of the Pi in it's case stays static on the page until you scroll past a certain point (around the 4th paragraph) Then it scrolls just like any static image. Interested to know how this is done.
- crazysim 13y agoSomething like this? https://github.com/bigspotteddog/ScrollToFixed https://github.com/bigspotteddog/ScrollToFixed
- Dogamondo 13y agoBrilliant, thank you! I'll try this :)
- shoobadabeedoop 13y agoJavaScript + CSS. Initially the image has position: absolute; and then once you scroll down a bit it's changed to position: fixed; which fixes the element relative to the view port.