I have a background image, 1000x666px, and only 93kb. I use it as a background image, with this code:
url(/Optimized-image1.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
When i set this image as a background, my jquery effects are very slow and not smooth at all. The same happens with my google maps stuff.
When i set the background just white or any other color, it’s all smooth, so I think my CSS-code isn’t that good.
I’ve tried to preload the image with javascript, but that’s not good. Also base64 is not working.
Any tips?
It seems
background-size: cover;performs poorly, at least in chrome.see Poor performance of Chrome using background-size: cover
Here’s a list of alternative solutions http://css-tricks.com/perfect-full-page-background-image/