HTML网页BODY中如何设置背景图拉伸的最有效方法
HTML部分:
<div id="BodyBg">
<img src="ImgBg.jpg" class="stretch" alt="" />
</div>
CSS部分:
#BodyBg{
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
z-index: 0;
}
.stretch {
width:100%;
height:100%;
}