Copy link to clipboard
Copied
Hello Everyone ,
So I have a .gif animation in the middle of the page, and I was wondering if there is a way to start the .gif animation only when I scroll down to it.
Currently it is looping on and on, but I need it to start only when I reach the middle of the page, and then stop playing after one loop.
Thanks
Copy link to clipboard
Copied
Read about Lazy Loading images.
Lazy Loading Images and Video | Web Fundamentals | Google Developers
Copy link to clipboard
Copied
Yes you can use scroll effects to make the gif 100% viewable only at that level of scroll and invisible 50 pixels above or below
p.s, a Edge animation can play once but a gif can't i.e, if you set it to anything else but forever the browser will not play it
Copy link to clipboard
Copied
Ussnorway wrote
p.s, a Edge animation can play once but a gif can't i.e, if you set it to anything else but forever the browser will not play it
Which browser? Animated GIF with a 5 time repeat works for me.
Copy link to clipboard
Copied
thats new, lets test it Benji ,
screen left = 5 center is forever and right is once
Photoshop can set any amount, the gif forever rule was made to stop spammers but it looks like Gif are coming back in trend again