[英]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.