麻烦老师看下,是否正确
来源:4-3 编程练习
weixin_慕设计5025467
2020-05-19 18:27:38
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{margin:0;
padding:0 ;}
.bg{background:no-repeat url(http://climg.mukewang.com/59c9f7ce0001839219034033.png) center top;
width: 1200px;
height: 4000px;
margin: 0 auto;}
.nav1{background: url(http://climg.mukewang.com/5a3383d00001a3dd02240364.png);
width:200px;
height:200px;
position:fixed;
top:50%;
margin-top: -100px;
}
.nav2{background: url(http://climg.mukewang.com/5a3383c70001f1b702240364.png);
width:200px;
height:200px;
position:fixed;
top:50%;
right:0px;
margin-top: -100px;
}
</style>
</head>
<body>
<div class="bg">
<div class="nav1"></div>
<div class="nav2"></div>
</div>
</body>
</html>
1回答
好帮手慕糖
2020-05-19
同学你好,代码是正确的。继续加油,祝学习愉快!
相似问题