Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Animated gif background causing lag on Ipad Air any work around?

Hi guys,

I am using method 'CSS-Only Technique #2' from the site below, but with an animated GIF:

http://css-tricks.com/perfect-full-page-background-image/

The GIF is relatively small (around 500KB) but it's causing my site to lag a lot when scrolling down / upwards. The div containing my text is actually loading / refreshing as if lazy-loading (I am not using lazyload plugin) when scrolling fast.

It takes a while for the my paragraph to load, and in the meantime the background animated gif freezes.

Is there any workaround for this?

The issue above disappears when the animated gif is replaced with a static image -- I'm quite sure it's the animated gif causing the lag here.

Anyway seems like this issue is only for iPad.

You could try reducing the size of your image, 500kb is pretty big, I know GIFs are intensive . You could also try serving as a looping video...

1 Answer

Yong Jin Goh do you have a live link so we can take a look / test?