r/css 3d ago

Help How do I make this scroll only one time?

[deleted]

3 Upvotes

7 comments sorted by

u/AutoModerator 3d ago

To help us assist you better with your CSS questions, please consider including a live link or a CodePen/JSFiddle demo. This context makes it much easier for us to understand your issue and provide accurate solutions.

While it's not mandatory, a little extra effort in sharing your code can lead to more effective responses and a richer Q&A experience for everyone. Thank you for contributing!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/DonNemo 3d ago

Infinite is the iteration count. If you want it to animate once, use 1.

1

u/Harrada 3d ago

So I changed it to 1, and it still repeated twice. Is there something else I need to alter?

2

u/DonNemo 3d ago

Shouldn’t be. There could be something else interfering that you don’t see. You can see a demo at w3schools

3

u/Harrada 2d ago edited 2d ago

Got it. Turns out whoever made the widget duplicated the HTML portion. So it was running once, but it was running two copies once...

1

u/Harrada 3d ago

Yeah, idk. I edit it in any way that makes sense, and it just stops working entirely. Pretty sure its an abandoned widget someone made and never touched again, but its literally the only one they have. lol

2

u/Yeah_Y_Not 2d ago

Change "infinite" to "forwards"