在ie中背景图片加载不出来,求指教。图片路径是没有问题的。
这里我不知道怎么上传图片,所以,希望大家随便找个图片试一下,或者看看哪里有问题
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;padding: 0;
}
html,body{
height: 100%;
}
.section,.sections,#container{
height: 100%;
}
#section0{
background: url(img/bg1.jpg) no-repeat red;
}
#section1{
background: url(img/bg2.jpg) no-repeat gold;
}
#section2{
background: url(img/bg3.jpg) no-repeat deepskyblue;
}
#section3{
background: url(img/bg4.jpg) no-repeat firebrick;
}
#section0,
#section1,
#section2,
#section3{
background-size: cover;
}
</style>
</head>
<body>
<div id="container">
<div class="sections">
<div class="section" id="section0">1</div>
<div class="section" id="section1">2</div>
<div class="section" id="section2">3</div>
<div class="section" id="section3">4</div>
</div>
</div>
</body>
</html>
background的简写在IE的低版本中是不可以的,改成background-image形式试试
你图片或者路径的问题把,我试了下没问题,IE11能模拟的版本下都可以。
图片后缀换成png就可以,我试了
不知道是不是图片受损 我曾经有一次就是一张图片在其他浏览器中都可以看到 Ie不显示 拖到ps里显示图片受损 不妨换一张图片