久久黄片免费播放|国产精品第十一久久任人草|欧美日韩青操免高清国产黄片|91婷婷五月天嫩女|欧美亚洲日韩激情|在线看无码视频久久久久夜|免费黄片网站进入|avtt男人天堂网|凸凹成人精品视频|日韩色情在线观看

css-父標簽中的子標簽默認位置

2016/12/1 8:46:09   閱讀:1788    發(fā)布者:1788

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.a{
width: 100px;
height: 100px;
background: red;
position: relative;
top: 40px;
left: 50px;
padding: 30px;
}
.b{
width: 50px;
height: 50px;
background: bisque;
position: absolute;
}
</style>
</head>
<body>
<div class="a">
<div class="b"></div>
</div>
</body>
</html>

 

 

如果不給b標簽設定top和left。他們會有個默認的值。

top和left會以width和height為基礎進行定位。