国产精品爱久久久久久久小说,女人扒开腿让男人桶到爽 ,亚洲欧美国产双大乳头,国产成人精品综合久久久久,国产精品制服丝袜无码,免费无码精品黄av电影,黑色丝袜无码中中文字幕,乱熟女高潮一区二区在线

            兩欄布局

            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://www.dzxscac.cn

            存檔

            主站蜘蛛池模板: 国产午夜片无码区在线观看爱情网| 成人午夜电影福利免费| 国产亚洲欧美精品久久久| 亚洲AV无码精品久久一区二区| 视频一区二区三区四区久久| 免费观看黄a片在线观看| 久久一区二区视频| 亚洲字幕av| 欧美福利一区二区| www.超碰在线.com| 天天做天天爱夜夜爽毛片毛片| 春色导航| 涩av| 亚洲一区二区三区无码中文字幕 | 欧美一区二区| 无码国产成人午夜电影观看| 国内精品免费视频| 女人18毛片水真多| 国产亚洲欧美一区二区三区在线播放| av国产在线观看| 人人狠狠| 麻豆久久久9性大片| 女人喷潮视频免费观看| 尤物视频官网| 免费黄色在线| 伊人久久精品欧洲综合网| 国产福利视频在线观看| 成年人香蕉视频| 提莫影院av毛片入口| 好紧好爽好深再快点av在线| 亚洲第一色区| 成人精品老熟妇一区二区| 男女扒开双腿猛进入免费看污| 图片区小说区视频区| 国产免费av观看| 久久中文字幕人妻熟av女蜜柚m| 在线看免费无码的av天堂| 网站在线看| 奇米777四色成人影视| 免费精品一区二区三区a片| 国产美女自拍视频|