div绝对定位

来源:互联网 发布:淘宝店怎样上传宝贝 编辑:程序博客网 时间:2024/06/07 11:07
<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>

0 0
原创粉丝点击