Create an infinite horizontal scroll animation
Kevin Powell Kevin Powell
906K subscribers
164,462 views
0

 Published On Sep 28, 2023

🎓 Did you know I have courses? Both free and premium ones: https://kevinpowell.co/courses?utm_ca...

Infinite scroll animations for things like logos are relatively common these days, but there is a lot that we can do incorrectly when making one, so I decided to try and make one that respects prefers-reduced-motion, and is progressively enhanced with just a couple of lines of JS to add in the functionality (and duplicate content that we’ll need).

đź”— Links
âś… The code from this video: https://codepen.io/kevinpowell/pen/Ba...
✅ My playlist on CSS masks:    • CSS Masks  

⌚ Timestamps
00:00 - Introduction
01:16 - The HTML
02:23 - Basic CSS
05:31 - Checking for prefers-reduced-motion with JavaScript
08:50 - Setting the stage for the animation with CSS
13:16 - Adding the animation
19:53 - Fixing the doubled content in the HTML
25:50 - Adding speed and direction options

#css

--

Come hang out with other dev's in my Discord Community
💬   / discord  

Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter

Come hang out with me live every Monday on Twitch!
📺   / kevinpowellcss  

---

Help support my channel
👨‍🎓 Get a course: https://www.kevinpowell.co/courses
đź‘• Buy a shirt: https://teespring.com/stores/making-t...
💖 Support me on Patreon:   / kevinpowell  

---

My editor: VS Code - https://code.visualstudio.com/

---

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Twitter:   / kevinjpowell  
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell

---

And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

show more

Share/Embed