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

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

<!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
	<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>
重新修改后使广告栏居中。这样还有问题嘛


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

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

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

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

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