If you’ve ever implemented a design with a fixed header, you’ve surely had this problem: You click a jump link like <a href="#header-3">Jump</a> which links to something like <h3 id="header-3">Header</h3>. That's totally fine, until you have a position: fixed; header at the top of the page obscuring the h3 you're trying to link to! Fixed …
Tag Archives: scrolling
Prevent content from being hidden underneath a fixed header by using
Pure CSS Scroll Shadows (Vertical + Horizontal)
A long time ago (2012!), Lea Verou shared a way on how to add scrolling shadows to containers that needs scrolling. Using those shadows in a scroll container is a great UX thing, as they visually tell the user that the content is scrollable. Her code however, only worked with containers that scroll vertically. Based …
Continue reading “Pure CSS Scroll Shadows (Vertical + Horizontal)”
React Native Parallax Scroll Header with Tabs
Nice writeup on how to create a typical screen where there’s a header image that fades out and disappears as you start scrolling. Essentially, everything but the header is put into a scrollview. In order to keep elements ‘fixed’ (i.e. the tab bar), I use the transform property with a translateY that is set to …
Continue reading “React Native Parallax Scroll Header with Tabs”
Scroll to the future – CSS and JavaScript features that make navigating around a single page smooth, beautiful and less resource-hungry.
Very in-depth article on Evil Martians’ team blog on scrolling: We have scrolled to the bottom of modern web specifications to take you on a whirlwind tour of latest CSS and JavaScript features that make navigating around a single page smooth, beautiful and less resource-hungry. Subjects tackled are styling of scrollbars, position: sticky, IntersectionObserver, Smooth …
Customizing Pull-to-Refresh and Overflow Effects with CSS’ overscroll-behavior
Continue reading “Customizing Pull-to-Refresh and Overflow Effects with CSS’ overscroll-behavior
“
Sticky Sidebar
Sticky Sidebar ⬆⬇ is a pure JavaScript plugin for making smart and high performance sticky sidebar, works with sidebar if it’s taller or shorter than the viewport, integrated with resize sensor to re-calculate the dimensions automatically when the size of sidebar or its container is changed, supports jQuery/Zepto and compatible with Firefox, Chrome, Safari, and …