2.8编程练习,这样写可以吗?
来源:2-10 编程练习
choyuky
2017-09-23 21:45:33
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
/*完善下列代码*/
.per{
width: 300px;
height: 300px;
background: red;
margin-left:200px;
margin-top: 200px;
position: relative;
}
.son{
width: 100px;
height: 100px;
background: blue;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto auto;
}
</style>
</head>
<body>
<div class="per">
<div class="son"></div>
</div>
</body>
</html>
1回答
就本段代码而言,效果实现的是可以的,继续加油!
相似问题