老师,我这样写对吗?居中还有什么更方便的写法吗?
来源:7-2 编程练习
慕娘0924178
2019-06-29 17:53:08
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.div0{
width:1903px;
height:4033px;
background-image:url("http://climg.mukewang.com/59c9f7ce0001839219034033.png");
position:relative;
}
.div1{
width:224px;
height:364px;
background-image:url("http://climg.mukewang.com/5a3383c70001f1b702240364.png");
position:fixed;
left:0px;
top:0px;
bottom:0px;
margin:auto 0px;
}.div2{
width:224px;
height:364px;
background-image:url("http://climg.mukewang.com/5a3383d00001a3dd02240364.png");
position:fixed;
right:0px;
top:0px;
bottom:0px;
margin:auto 0px;
}
</style>
</head>
<body>
<div class="div0">
<div class="div1"></div>
<div class="div2"></div>
</div>
</body>
</html>1回答
同学完成的不错哦,同学这样的写法已经很简单了呢。祝学习愉快~
相似问题