Maybe you want to use a CSS transition or animation on scroll. With a JavaScript one-liner, we can set a CSS custom property that knows the percentage of the page scrolled: Now we have --scroll as a value we can use in the CSS. Then, in our CSS we can assign them different animations like so: Define the animations using Keyframes. All of the critiques against scrolling text apply when the text is in the foreground - when it's a main element in the site's design. (I understand it's b flat major, if you're wondering). The animation to show/hide the line is one shared animation for all items that does both the showing and the hiding: Now it gets tricky though: for each navigation item we create a different @scroll-timeline whose scroll-offsets and time-range vary. With too much movement or detail, a simple text can become too distracting to read, losing the point of the animation entirely. If you want, you can also put in more than two values, but note that your scroll to time mapping might become wonky. The second is the title of the article and it stays visible at the top of the screen, while the body of the content disappears behind it on scroll (which is the typical sticky element behavior). Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. This is a small demo forked from this demo by Adam Argyle, which put CSS @scroll-timeline on my radar (thanks, Adam!). Design visually attractive and high-performing websites without writing a line of code WoW your clients by creating innovative and response-boosting websites Even google first indexes the static HTML and then only if it decides to, it may or may not index your site with Javascript on. Lets move on to the third item adding the ability to execute a callback function when we scroll to a targeted element. I updated the post a long time ago to no longer rely on this `time-range`, but seem to have forgotten to update that paragraph about `animation-duration`. It uses HTML, CSS and JavaScript to pull this off. The page features a 4-panel full-page carousel with numbers that slide into view. Same with beer. Another great tool for businesses looking to spruce up their website, this animation includes many eye-catching features. As you scroll down, the scene changes entirely from morning to night. Okay, well GSAP is the number one choice if you are after high performance animation Javascript library. Used to track the information of the embedded YouTube videos on a website. New @scroll-timeline demo I created over lunch, forked from a demo initially by @argyleinkKey techniques used: Scroll Snapping mix-blend-mode @scroll-timeline Smooth Scrolling https://t.co/iLikwBwxgqThat's right, not single line of JavaScript in sight! Scrollsequence WordPress Plugin. He even included the music ahh that opening chord hits you right in the nostalgia doesn't it? With this, the reveal elements will be hidden until the active class is added. You could animate individual blocks of text, let each paragraph load one after the other. How to make scroll image animation like Sony, Apple and Samsung If youre feeling adventurous you can play with these new features today, but youll need at least Chromium 89 with the #experimental-web-platform-features flag enabled through chrome://flags. Thats not necessary either, as it will fall back to default values for source, orientation, and scroll-offsets. Next, the conditions for execution so the links become active as you scroll down the page. See the Pen Scroll-Linked Animations: Counter and Snap Points with Navigation Controls [variant 1] (@scroll-timeline version) by Bramus (@bramus) on CodePen. See the Pen Scroll-Linked Animations Visualization: Progressbar by Bramus (@bramus) on CodePen. Another simple animation with flying text and wobbling images that will catch the eyes of your website visitors. If you think you would be able to dynamically set the in source by means of CSS Custom Property, dont bother: CSS Variables cannot be used within descriptors. The time-range descriptor is of the CSS