{"id":183272,"date":"2014-09-17T07:40:59","date_gmt":"2014-09-17T14:40:59","guid":{"rendered":"http:\/\/css-tricks.com\/?p=183272"},"modified":"2014-09-17T11:22:14","modified_gmt":"2014-09-17T18:22:14","slug":"scroll-fix-content","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/scroll-fix-content\/","title":{"rendered":"Scroll-Then-Fix Content"},"content":{"rendered":"

A reader sent me in a GIF showing off a cool effect they saw on Google on mobile. (Presumably the homepage you see when you launch Chrome on Android?) There is a search input in the middle of the page that scrolls with the page, but as it’s about to scroll off the page, it becomes affixed to the header. Let’s cover that, because, you know…<\/p>\n

\n

OH: I'm a mobile web developer, so I basically spend all day getting requests for content to stick to the top after some scrolling<\/p>\n

— Daniel Wilson (@dancwilson) September 16, 2014<\/a><\/p><\/blockquote>\n