4 ms·
this is essentially built into css now, with position: sticky http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit http://
by cleverjake 14y ago
this is essentially built into css now, with position: sticky
http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit http://updates.html5rocks.com/2012/08/Stick-your-landings-po...
- rxooo 14y agoMy browser (chrome) doesn't support position: sticky so I guess the solution proposed is a lot better for compatibility.
- cleverjake 14y agooh for sure, and great job at it. I was just pointing out that this was more of a polyfill than a long term solution.
- pestaa 14y agoActually I believe it is position: fixed.
- michalstanko 14y agoFrom the article linked above: "position: sticky is a new way to position elements and is conceptually similar to position: fixed. The difference is that an element with position: sticky behaves like position: relative within its parent, until a given offset threshold is met in the viewport."