Mobile app version of vmapp.org
Login or Join
Phylliss660

: Fixed background images not displaying correctly on any web browser Screenshot for this question: I am using fixed position images as seen at css-tricks.com/examples/BlurryBackgroundEffect/ to

@Phylliss660

Posted in: #Css #Images

Screenshot for this question:



I am using fixed position images as seen at
css-tricks.com/examples/BlurryBackgroundEffect/
to create a glassy effect to a web project I'm working on. As you can see on the screenshot above often the content block image fails to display until the browser is forced to make a redraw by scrolling etc.

I've tried preloading them, using both onload and hidden img tags separately, but it still happens.

This is not a massive issue but if anyone understands why this occurs it would be really helpful.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Phylliss660

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

If you want to trigger a redraw you could always use:

body { display: none }


then

window.onload = function () {
document.getElementsByTagName('body')[0].display = 'block';
}


this will make the page load seem much longer.

The best advice I've read on controlling the load/redraw across browsers has been Steve Souders Even Faster Web Sites.

Note:

Remember you can always put the relevant sections on a JSFiddle so that others can help (images can be uploaded to ImageShack and included by using the provided "Direct Link").

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme