双飞翼布局

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
      *{
        padding: 0;
        margin: 0;
      }
      .father{
        position: relative;
        min-width: 700px;
      }
      .left{
        height: 200px;
        width: 200px;
        background: rgba(255,0,0,0.5);
        float: left;
        /*float: left;*/
        position: absolute;
        left: 0;
        top: 0;
      }
      .right{
        height: 200px;
        width: 200px;
        background: rgba(255,0,0,0.5);
        float: left;
        /*float: right;*/
        position: absolute;
        right: 0;
        top:0;
      }
      .center{
        height: 200px;
        background: blue;
        /*float: left;*/
        /*width: calc(100% - 400px);*/
        margin-left: 200px;
        margin-right: 200px;
        /*min-width: 300px;*/
      }
    </style>
  </head>
  <body>
    <div class="father">
      <div class="left"></div>
      <div class="center"></div>
      <div class="right"></div>
    </div>
  </body>
</html>

 

posted @ 2017-09-04 19:57  鱼樱前端  阅读(154)  评论(0编辑  收藏  举报