In this video, we're going to implement parallax scrolling in just 3 lines of code using Framer Motion!
Starter source code: https://github.com/Built-With-Code/fr...
Thanks for watching!
TIMESTAMPS:
0:00 - Intro + Preview
0:34 - Starter code
1:29 - Intuition behind parallax scrolling
2:06 - Line 1: useScroll to track scrolling
2:38 - Line 2: useTransform to calculate position shift
3:20 - Line 3: style hero video with calculated position shift
4:52 - Additional attributes for useScroll
7:16 - Outro
-------------------------------
Welcome to Built With Code! On this channel, you'll find coding tutorials on how to create and build your next awesome coding project, including websites and web apps. We'll use advanced frameworks such as Next.js, GSAP, and Framer Motion, and a whole lot more. If that sounds like fun, SUBSCRIBE to the channel - it'd be much appreciated!