• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Start playing .gif when scrolled to it

New Here ,
Apr 04, 2019 Apr 04, 2019

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

Views

351

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

Read about Lazy Loading images.

Lazy Loading Images and Video  |  Web Fundamentals  |  Google Developers

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 04, 2019 Apr 04, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2019 Apr 05, 2019

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.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines