css背景图片自适应

用css3来解决背景图自适应的问题

浏览器支持:

Firefox 3.6+ , Chrome 1.0+ , Opera 9.63+, IE9 +

具体写法

<style>

.container{background-image:url(‘’) ;background-attachment:fixed;background-repeat:no-repeat;background-size:cover;-moz-background-size:cover;-webkit-background-size:cover;}

</style>

<body>

<div class=”container”>

</div>

</body>

本文链接:https://www.dnwfb.com/1079.html,转载请注明出处。
0

评论0

没有账号? 注册  忘记密码?