首页 > 其他 > 详细

浮动布局

时间:2016-04-18 00:56:09      阅读:165      评论:0      收藏:0      [点我收藏+]
<html>
 <head>
  <title>Float浮动布局
  </title>
  <style>
  div{
     width:100px;
     height:100px;
    
  }
  #headeer{
     width:40px;
     height:40px;
     background:red;
     float:left
  }
  #main{
     width:40px;
     height:40px;
     background:yellow;
     float:right;
  }
  #footer{
     width:40px;
     height:40px;
     background:green;
     float:left;
     margin-top:20px;
  }
  #comm{
     width:40px;
     height:40px;
     background:black;
      margin-top:20px;
     float:right;
  }
  </style>
 </head>
 <body>
   <div>
        <div id="headeer">我是左上</div>
        <div id="main">我是右上</div>
        <div id="footer">我是左下</div>
        <div id="comm">我是右下</div>
    </div>
 </body>
</html>



 

浮动布局

原文:http://www.cnblogs.com/bingg/p/5402745.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!