求大神解决css问题 background-attachment: fixed;无效 代码如下,为什么会无效啊 10
<!DOCTYPEhtml><html><head><metacharset="utf-8"><title></title><styletype="text/css">*...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
*{margin: 0;padding: 0;}
html,body{height:100%;}
.bg{height:100%;}
.imgBox{widows: 100%;height:100%;background-position: center;background-attachment: fixed;}
.img_01{background:url("img/bg_01.jpg");}
.img_02{background:url("img/2.jpg");}
</style>
</head>
<body>
<!--背景图片开始 -->
<div class="bg">
<div class="imgBox img_01"></div>
<div class="imgBox img_02"></div>
</div>
<!--背景图片结束 -->
</body>
</html> 展开
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
*{margin: 0;padding: 0;}
html,body{height:100%;}
.bg{height:100%;}
.imgBox{widows: 100%;height:100%;background-position: center;background-attachment: fixed;}
.img_01{background:url("img/bg_01.jpg");}
.img_02{background:url("img/2.jpg");}
</style>
</head>
<body>
<!--背景图片开始 -->
<div class="bg">
<div class="imgBox img_01"></div>
<div class="imgBox img_02"></div>
</div>
<!--背景图片结束 -->
</body>
</html> 展开
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询