老师,这样做对吗
来源:4-3 编程练习
慕勒2497449
2020-02-27 20:00:54
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.container{
width: 100%;
height: 4033px;
}
.main{
width: 100%;
height: 100%;
background: url("http://climg.mukewang.com/59c9f7ce0001839219034033.png") no-repeat center top;
}
.rightAdvertise{
width: 224px;
height: 364px;
background: url("http://climg.mukewang.com/5a3383c70001f1b702240364.png") no-repeat;
position: fixed;
top: 50%;
margin-top: -182px;
right: 0;
}
.leftAdvertise{
width: 224px;
height: 100%;
background: url("http://climg.mukewang.com/5a3383d00001a3dd02240364.png") no-repeat;
position: fixed;
top: 50%;
margin-top: -182px;
left: 0;
}
</style>
</head>
<body>
<div class="container">
<div class="main">
<div class="leftAdvertise"></div>
<div class="rightAdvertise"></div>
</div>
</div>
</body>
</html>1回答
好帮手慕夭夭
2020-02-28
同学你好,左侧的div设置的高度与右侧的div不一致:

如下修改:

如果我的回答帮助到了你,欢迎采纳,祝学习愉快~
相似问题