老师 我这样做行吗 哪里需要改进的

老师 我这样做行吗 哪里需要改进的

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.img1{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
}
.img2,.img3{
width: 200px;
height: 350px;
}
.div2{
position: fixed;
left: 1%;
top: 30%;
}
.div3{
position: fixed;
right:1%;
top: 30%;
}
</style>
</head>
<body>
<div class="div1">
<img class="img1" src="http://img1.sycdn.imooc.com/climg//59c9f7ce0001839219034033.png">
 
<div class="div2">
<img class="img2" src="http://img1.sycdn.imooc.com/climg//5a3383c70001f1b702240364.png">
</div>
 
<div class="div3">
<img class="img3" src="http://img1.sycdn.imooc.com/climg//5a3383d00001a3dd02240364.png">
</div>
</div>
</body>
</html>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
提问者 jia_蛙 2019-10-10 10:27:56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<style type="text/css">
    .img1{
        position: absolute;
        top: 0px;
        left: 0px;
        width: 100%;
    }
    .img2,.img3{
        width: 200px;
        height: 350px;
    }
    .div2{
        position: fixed;
        left: 1%;
        top: 50%;
        margin-top: -175px;
    }
    .div3{
        position: fixed;
        right:1%;
        top: 50%;
        margin-top: -175px;
    }
</style>
1
重新修改后使广告栏居中。这样还有问题嘛


  • 同学很棒呐,修改后的代码完成了广告栏的垂直居中,继续加油~ 如果我的回答解决了你的疑惑,请采纳!祝学习愉快!
    2019-10-10 13:55:14
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师
插入代码