老师,这样写对吗?使元素垂直居中可以这样吗?
来源:7-2 编程练习
复java_n
2020-06-01 22:29:58
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.img1{
width: 1260px;
}
.img2{
width: 200px;
height: 300px;
position: fixed;
top: 200px;
left: 0px;
line-height: 150px;
}
.img3{
width: 200px;
height: 300px;
position: fixed;
right:0px;
top: 200px;
line-height: 150px;
}
</style>
</head>
<body>
<div class="div0">
<img class="img1" src="http://climg.mukewang.com/59c9f7ce0001839219034033.png">
<div class="div2"><img class="img2" src="http://climg.mukewang.com/5a3383c70001f1b702240364.png"></div>
<div class="div3"><img class="img3" src="http://climg.mukewang.com/5a3383d00001a3dd02240364.png"></div>
</div>
</body>
</html>
1回答
同学你好,可以的,练习题完成的不错,很棒,继续加油
祝学习愉快
相似问题