mercredi 1 avril 2015

background-image in body:before on IE not working

I have created a webdesign with used body:before tag to 'split' the design, similar to the TwentyFifteen theme of WordPress (http://ift.tt/1wvF737)


But I don't use a color for the "left" column, but an image. The Code works in all browsers fine (Chrome, FF, Safari) but not in IE (Version 9-11).


The CSS looks like:



body::before {
background: url("img/back-left.jpg") no-repeat center top ;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
content: "";
display: block;
height: 100%;
min-height: 100%;
position: fixed;
top: 0;
left: 0;
width: 30%;
z-index: 1;
}


The effect: the background picture was not showing, when open the page with IE. When I go to a sub-site, the picture was showing. When I transform the browser windows, the picture was showing. When I change ANYTHING (no matter what) in IE Dev toolbar, the picture was showing.


If I use background-color instead of background (or background-image), it works fine on IE.


Any ideas? I think it sounds like a rendering thing. The background image was rendered too late and so was not showing (instead I interact everthing on the page). But how to fix it?


Aucun commentaire:

Enregistrer un commentaire