<strike id="3tkic"><sup id="3tkic"></sup></strike>

  1. <ul id="3tkic"></ul>
      <b id="3tkic"><legend id="3tkic"></legend></b>
      <b id="3tkic"><meter id="3tkic"></meter></b>

    • <strike id="3tkic"></strike>

      <blockquote id="3tkic"></blockquote>

    • 亚洲AV无码国产在丝袜线观看_亚洲第一页A∨在线_亚洲国产人成在线观看69网站_无码日韩人妻AV一区免费l

      兩列布局(一列定寬,一列自適應(yīng),列等高)

      2016/9/18 8:50:01   閱讀:1447    發(fā)布者:1447

      結(jié)構(gòu):

      1    <div class="parent"> 
      2         <div class="left"> 
      3             <p>left</p> 
      4         </div> 
      5         <div class="right"> 
      6             <p>right</p> 
      7             <p>right</p> 
      8         </div> 
      9     </div>

      1.用table+table-cell實現(xiàn)兩列布局(一列定寬,一列自適應(yīng),且table是自動的兩列自動等高)

       1 .parent { 
       2         background-color: grey; 
       3         width: 500px; 
       4         height: 300px; 
       5         padding: 10px; 
       6         box-sizing: border-box; 
       7  
       8         display: table; 
       9         table-layout: fixed; 
      10         table-layout: fixed;/*加速table的渲染,實現(xiàn)布局優(yōu)先*/ 
      11     } 
      12     .left { 
      13         display: table-cell; 
      14         width: 100px; 
      15  
      16         background-color: skyblue; 
      17         border-right: 10px solid transparent; 
      18         background-clip: padding-box;/*設(shè)置背景的顯示位置*/ 
      19     } 
      20     .right { 
      21         display: table-cell; 
      22         background-color: greenyellow; 
      23     }

      2. 使用flex進(jìn)行兩列布局(一列定寬,一列自適應(yīng),列等高),flex的align-item屬性默認(rèn)值是stretch.

       1 .parent { 
       2         background-color: grey; 
       3         width: 500px; 
       4         height: 300px; 
       5         padding: 10px; 
       6  
       7         display: flex; 
       8     } 
       9     .left { 
      10         width: 100px; 
      11         margin-right: 10px; 
      12         background-color: skyblue; 
      13     } 
      14     .right { 
      15         flex: 1; /* 填充剩余部分 */ 
      16         background-color: greenyellow; 
      17     }

      3.使用float(偽等高)

       1 .parent { 
       2         background-color: grey; 
       3         width: 500px; 
       4         height: 300px; 
       5         padding: 10px; 
       6  
       7         overflow: hidden;/*截斷*/ 
       8     } 
       9     .left,.right { 
      10         padding-bottom: 99999px; 
      11         margin-bottom: -99999px; 
      12     }/*登高*/ 
      13     .left { 
      14         width: 100px; 
      15         background-color: skyblue; 
      16         margin-right: 10px; 
      17         float: left; 
      18          
      19     } 
      20     .right { 
      21         overflow: hidden; 
      22         background-color: yellowgreen; 
      23     }

       

      亚洲AV无码国产在丝袜线观看_亚洲第一页A∨在线_亚洲国产人成在线观看69网站_无码日韩人妻AV一区免费l
      <strike id="3tkic"><sup id="3tkic"></sup></strike>

      1. <ul id="3tkic"></ul>
          <b id="3tkic"><legend id="3tkic"></legend></b>
          <b id="3tkic"><meter id="3tkic"></meter></b>

        • <strike id="3tkic"></strike>

          <blockquote id="3tkic"></blockquote>

        • 双峰县| 济南市| 夹江县| 哈尔滨市| 高密市| 中西区| 康保县| 潜山县| 洛扎县| 江孜县| 焦作市| 连江县| 交口县| 墨脱县| 灵寿县| 梁山县| 楚雄市| 奉化市| 若尔盖县| 商丘市| 四会市| 南昌市| 周宁县| 英山县| 休宁县| 神木县| 澄迈县| 繁昌县| 呼和浩特市| 健康| 凤阳县| 青阳县| 合阳县| 渑池县| 长岛县| 西青区| 子洲县| 青阳县| 资中县| 建水县| 泸溪县|