<span style="font-size:14px;"><span style="font-size:18px;"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>div绝对定位</title>
</head>
<style>
#father{
background-color: green;
width: 100%;
height: 100px;
border:1px dashed gray;
position: relative;
}
#son1{
position: absolute; /*相对于father定位*/
right: 0px;
}
#son2{
}
</style>
<body>
<div>
<div id="father">
<div id="son1">aaaaaa</div>
<div id="son2">bbbbbb</div>
<div id="son3">cccccc</div>
</div>
</div>
</body>
</html></span>
</span>
div绝对定位
最新推荐文章于 2022-05-21 15:08:40 发布