html总结:背景图片拉伸

两种方法:

⑴推荐方法

<style>
body 
{
background-image:url(images/backimage.jpg);
background-size:cover;
}
</style>

<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:-1">
<img src="images/backimage.jpg" height="100%" width="100%"/>
</div>

posted @ 2018-04-11 21:15  Felix_9190  阅读(839)  评论(0编辑  收藏  举报