请老师检查
来源:4-3 编程练习
年少多斤
2019-03-14 15:40:06
<!DOCTYPE html>
<html>
<head>
<title>大作业一</title>
</head>
<style type="text/css">
*{
margin: 0;
padding: 0;
font-family: ‘微软雅黑’;
}
.mook{
width: 100%;
height: 4043px;
background: url(http://climg.mukewang.com/59c9f7ce0001839219034033.png);
}
.lnav{
width: 250px;
height: 250px;
background: url(http://climg.mukewang.com/5a3383d00001a3dd02240364.png) no-repeat;
position: fixed;
left: 0;
top: 50%;
}
.rnav{
width: 250px;
height: 250px;
background: url(http://climg.mukewang.com/5a3383c70001f1b702240364.png) no-repeat ;
position: fixed;
right: 0;
top: 50%;
}
</style>
<body>
<div class="mook">
<div class="lnav"></div>
<div class="rnav"></div>
</div>
</body>
</html>
1回答
山河远阔ZZ
2019-03-14
同学你好,代码中有以下几个问题:
1、建议把广告的宽度设置为跟图片本身的宽度一致;
2、建议广告图片设置垂直居中,通过定位+负margin的方式。
参考下图:

自己试一试哦,如果帮助到了你,欢迎采纳。
祝学习愉快!