zoukankan      html  css  js  c++  java
  • 布局:position:absolute;

    <body>
        <div class="childDiv" >
        <div  class="box box01">1</div>
        <div class="box box02">2</div>
        <div class="box box03">3</div>
        <div class="box box04">4</div>
        </div>
    </body>
    body{margin:0;padding:0;}
    
    .childDiv{
        background-color:pink;
        height:100%;
        width:100%;
        position:absolute;
    }
    .box{background-color:purple;height:200px; width:200px; position:absolute;}
    .box01{ background-color:deeppink; left:0; top:0;} 
    .box02{ top:0; right:0; }
    .box03{background-color:orange; bottom:0; left:0; }
    .box04{ bottom:0; right:0;}

    <body>
      <
    div class="childDiv middleCenter">    <div class="box box01">1</div>   <div class="box box02">2</div>   <div class="box box03">3</div>   <div class="box box04">4</div>   <div class="box_core" style="">center</div>   </div>
    </body>
    .childDiv{
        background-color:pink;
        height:100%;
        width:100%;
        position:absolute;
    }
    
    
    .middleCenter{
        display:-webkit-box;
         display:-moz-box;    
        display:-ms-flexbox; 
        display:box; 
    
        -webkit-box-pack:center; 
        -moz-box-pack:center;
        -ms-flex-pack:center; 
        box-pack:center; 
    
        -webkit-box-align:center; 
        -moz-box-align: center; 
        -ms-flex-align:center; 
        box-align:center;   
    }
    
    
    .box_core{
        width:200px;
         height:200px; 
        background-color:gray;

  • 相关阅读:
    trie树
    基数排序
    CF724E Goods transportation 最小割 DP
    [CQOI2009]跳舞 网络流
    NOIP2018爆零记
    斜率优化
    CF311B Cats Transport 斜率优化DP
    逆元
    卡特兰数
    【BZOJ】【1565】【NOI2009】PVZ 植物大战僵尸
  • 原文地址:https://www.cnblogs.com/jiunie/p/11322560.html
Copyright © 2011-2022 走看看