请老师帮我检查作业
来源:4-3 编程练习
愛码仕
2020-04-24 10:48:19
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.box{
width:100%;
height:auto;
position:relative;
}
.one,.two{
width:225px;
height:365px;
position:fixed;
top:0;
bottom:0;
margin:auto;
}
.two{
top:0;
bottom:0;
right:0;
margin:auto 0;
}
</style>
</head>
<body>
<div class="box">
<img src="http://climg.mukewang.com/59c9f7ce0001839219034033.png">
<div class="one"><img src="http://climg.mukewang.com/5a3383c70001f1b702240364.png"></div>
<div class="two"><img src="http://climg.mukewang.com/5a3383d00001a3dd02240364.png"></div>
</div>
</body>
</html>
1回答
同学你好,代码实现是正确的,建议优化:使用通配符去除所有元素的默认间距,效果实现会更好。
如果我的回答帮助到了你,欢迎采纳,祝学习愉快~
相似问题