国产69囗曝吞精在线视频,肥臀浪妇太爽了快点再快点,亚洲欧洲成人a∨在线观看,狠狠色丁香久久综合 ,国精一二二产品无人区免费应用,亚洲精品久久久久中文字幕,四虎一区二区成人免费影院网址 ,无码三级中文字幕在线观看

      兩欄布局

      2019-11-29    seo達人

      兩列布局的幾種方法

      html結構

       <div class="content">

            <div class="content-left">

              左側固定200px

            </div>

            <div class="content-right">

              右側自適應

            </div>

       </div>



      1.通過float和margin-left

       / 清除瀏覽器默認邊距 /

            {

              margin: 0;

              padding: 0;

            }



            .content{

              overflow: hidden;

            }

            /
      脫離文檔流 /

            .content-left {

              float: left;

              width: 200px;

              height: 200px;

              background: red;

            }



            .content-right {

              /
      通過margin-left將左邊位置空出 /

              margin-left: 200px;

              background: blue;

              height: 200px;

            }



      2.通過 position: absolute;絕對定位

       /
      清除瀏覽器默認邊距 /

           
      {

              margin: 0;

              padding: 0;

            }



            .content {

              overflow: hidden;

              position: relative;

            }

            / 脫離文檔流 /

            .content-left {

              position: absolute;

              top: 0;

              left: 0;

              width: 200px;

              height: 200px;

              background: red;

            }



            .content-right {

              / 通過margin-left將左邊位置空出 /

              margin-left: 200px;

              background: blue;

              height: 200px;

            }



      3.通過flex彈性布局

      / 清除瀏覽器默認邊距 /

            {

              margin: 0;

              padding: 0;

            }



            .content {

              overflow: hidden;

              display: flex;

            }

            .content-left {

                /
      除了width: 200px;還可以flex-basis: 200px; /

              width: 200px;

              height: 200px;

              background: red;

            }



            .content-right {

                /
      flex:1;將剩余空間分給它 /

              flex: 1;

              background: blue;

              height: 200px;

            }



      4.通過 display: table;表格布局

       /
      清除瀏覽器默認邊距 /

           
      {

              margin: 0;

              padding: 0;

            }



            .content {

              overflow: hidden;

              display: table;

              / 必須給父級定寬不然自適應盒子沒定寬只會由內容撐開 /

              width: 100%;

            }

            .content-left {

              display: table-cell;

              width: 200px;

              height: 200px;

              background: red;

            }



            .content-right {

              display: table-cell;

              background: blue;

              height: 200px;

            }



      5.通過inline-block和calc()函數

       / 清除瀏覽器默認邊距 /

            {

              margin: 0;

              padding: 0;

            }



            .content {

              /
      必須加font-size=0;把inline-block默認間距去掉,

              不過設置后里面文字不顯示了可以給里面塊設置font-size:20px;

              或者把兩個塊之間的換行刪掉也能去掉間距/

              font-size: 0;

              overflow: hidden;

            }

            .content-left {

              font-size: 20px;

              display: inline-block;

              width: 200px;

              height: 200px;

              background: red;

            }



            .content-right {

              font-size: 20px;

              display: inline-block;

              background: blue;

              height: 200px;

              /
      注意calc里的運算符兩邊要有空格 /

              width: calc(100% - 200px);

            }



      6.通過float和calc()函數,左右兩塊都要浮動

       /
      清除瀏覽器默認邊距 /

           
      {

              margin: 0;

              padding: 0;

            }



            .content {

              overflow: hidden;

            }

            .content-left {

              float: left;

              width: 200px;

              height: 200px;

              background: red;

            }

            .content-right {

              float: left;

              background: blue;

              height: 200px;

              / 注意calc里的運算符兩邊要有空格 /

              width: calc(100% - 200px);

            }



      7.使用grid布局

       / 清除瀏覽器默認邊距 /

            {

              margin: 0;

              padding: 0;

            }



            .content {

              overflow: hidden;

              display: grid;

              grid-template-columns: 200px 1fr;

              /
      grid布局也有列等高的默認效果。需要設置: align-items: start;。 /

              align-items: start;

            }

            .content-left {

              height: 200px;

              background: red;

              /
      grid布局還有一個值得注意的小地方和flex不同:在使用margin-left的時候,

              grid布局默認是box-sizing設置的盒寬度之間的位置。

              而flex則是使用兩個div的border或者padding外側之間的距離。 */

              box-sizing: border-box;

              grid-column: 1;

            }

            .content-right {

              background: blue;

              height: 200px;

              box-sizing: border-box;

              grid-column: 2;

            }



      日歷

      鏈接

      個人資料

      藍藍設計的小編 http://m.izc.net.cn

      存檔

      主站蜘蛛池模板: 亚洲综合无码明星蕉在线视频| 久久草莓香蕉频线观| 黄色小视频在线| 最全aⅴ番号库| 无码专区aaaaaa免费视频| 久久99精品久久久久免费| 福利色播| 亚洲天堂网中文在线资源| 久久麻豆成人精品| 在线观看国产丝袜控网站| 夜夜撸影院| 浪潮av色综合久久天堂| 在线涩涩免费观看国产精品| 精品免费视频| 免费日本视频| 韩国无码AV片午夜福利| 国内精品乱码卡一卡2卡三卡 | 放荡的少妇2欧美版| 97国产一区二区三区四区久久| 四虎音影| 少妇4p| 激情 小说 亚洲 图片 伦| 国产乱人伦偷精品视频免| 国产裸体视频| 免费黄色网址在线| 老熟妇仑乱一区二区视頻| 亚洲国产欧美一区三区成人 | 久久96热人妻偷产精品| 日本高清中文字幕免费一区二区 | 无套内谢88av免费看| 中文文字幕文字幕亚洲色| 成人午夜视频一区二区无码| 扒下小娇妻的内裤打屁股| 久久久久久久久艹| 装睡被陌生人摸出水好爽| 久久精品影视免费观看| 日韩av资源| 91正在播放| 白嫩少妇激情无码| 久久综合色一综合色88| 岛国一区二区|