老师 我这样做行吗 哪里需要改进的
<!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
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>重新修改后使广告栏居中。这样还有问题嘛
2. 从网页搭建入门JavaWeb
- 参与学习 人
- 提交作业 676 份
- 解答问题 9666 个
本阶段将从前端网页搭建入手,到Java Web基础,前后端结合助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星