[英]Stretching div background image for IE7
谷歌进行了快速搜索(我还没有测试过,但是谷歌是一个很好的好朋友):
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
img#bg{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
#content {
position:relative;
z-index:1;
}
</style>
编辑:德普。 忘记了示例HTML
</head>
<body>
<img src="size-bg.jpg" alt="background image" id="bg" />
<div id="content">Your website content.</div>
</body>
</html>
链接自: http : //dipaksblogonline.blogspot.com/2011/01/ie-78-stretching-background-image-to.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.