由于某种原因,背景图像在 IE11 (Windows 7 Pro) 中根本不显示。
.home {
position:relative;
height: 620px;
background-image: url(/images/bg_home3.jpg);
background-position: 540px 190px;
background-repeat: no-repeat;
}
有什么线索吗?
如果您尝试为 HTML5 元素设置背景,则它可能在 IE11 中没有某些默认样式。例如,如果该元素是 main ,请尝试为其设置 display: block 。您也可以尝试设置宽度,但是如果没有看到更多代码,就无法为您提供更多帮助。看下面的例子。
.home {
display: block;
width: 100%;
position:relative;
height: 620px;
background-image: url("/images/bg_home3.jpg");
background-position: 540px 190px;
background-repeat: no-repeat;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)