@KevinPowell
  @KevinPowell
Kevin Powell | Create an infinite horizontal scroll animation @KevinPowell | Uploaded September 2023 | Updated October 2024, 1 hour ago.
πŸŽ“ Did you know I have courses? Both free and premium ones: kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=infinitescroll

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: codepen.io/kevinpowell/pen/BavVLra
βœ… My playlist on CSS masks: youtube.com/playlist?list=PL4-IK0AVhVjPwzAHB5ekhsKXxIlbbRVYY

⌚ 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.gg/nTYCvrK

Keep up to date with everything I'm up to
βœ‰ kevinpowell.co/newsletter

Come hang out with me live every Monday on Twitch!
πŸ“Ί twitch.tv/kevinpowellcss

---

Help support my channel
πŸ‘¨β€πŸŽ“ Get a course: kevinpowell.co/courses
πŸ‘• Buy a shirt: teespring.com/stores/making-the-internet-awesome
πŸ’– Support me on Patreon: patreon.com/kevinpowell

---

My editor: VS Code - 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: twitter.com/KevinJPowell
Codepen: codepen.io/kevinpowell
Github: 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!
Create an infinite horizontal scroll animationCSS shorthands arent always worth it5 tips to getting better at CSSStyle queries are better than I thought they would beTab filtering animation with view transitions / HTML, CSS & JSThese CSS features give us more control on the cascade and specificity3 under-rated VS Code shortcutsDynamically number elements with a few lines of CSSA simple approach to layouts when going from design to codeWrite better CSS using logical propertiesA great way to showcase your skills to employersThe differences between CSS and Sass Nesting

Create an infinite horizontal scroll animation @KevinPowell

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER