给son增加个left:100px;为啥是往右移动了?
<!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:0px;*/
left:100px;
/*right:100px;*/
/*bottom:100px;*/
/*margin:auto auto;*/
}
</style>
</head>
<body>
<div class="per">
<div class="son"></div>
</div>
</body>
</html>
15
收起
正在回答 回答被采纳积分+1
2回答

恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星