IE7不支持Parallax CSS效果?

时间:2013-11-15 11:29:38

标签: html css internet-explorer internet-explorer-8 internet-explorer-7

我使用了一个简单的CSS视差效果example,它在除IE7 + 8之外的所有浏览器中都有效。是否有解决方法或者是否不支持?

<h1>My Page</h1>
<h2>Flowers, Flowers, Flowers </h2>

<div id="slide4" class="slide" data-stellar-background-ratio="0" data-slide="4"> </div>
    <div id="slide2" class="slide" data-stellar-background-ratio="0.5" data-slide="2"> </div>

<h2>Some text goes here</h2>
<h2>Some text goes here</h2>
<h2>Some text goes here</h2>
<h2>Some text goes here</h2>
<h2>Some text goes here</h2>

#slide4 {background-image: url("http://ibmsmartercommerce.sourceforge.net/wp-content/uploads/2012/09/Roses_Bunch_Of_Flowers.jpeg");
background-size: contain;
float: left;
margin-top:20px;
height: 450px;}

.slide {background-attachment: fixed;
height: 100%;
position: inherit;
width: 100%;}

1 个答案:

答案 0 :(得分:-1)

IE8无法使用background-size:http://caniuse.com/#feat=background-img-opts

如果您尝试使用背景尺寸:封面,请查看此信息:http://css-tricks.com/perfect-full-page-background-image/

你也可以在8

中使用这种polyfill来支持背景尺寸

https://github.com/louisremi/background-size-polyfill