第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

三欄布局之中間固定,左右兩欄自適應幾種方案

三栏布局,假定中间宽度固定为200px,左右两栏自适应
grid布局,请到最新chrome浏览器上运行体验

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>三栏布局之中间固定,左右两栏自适应</title>
    <style type="text/css">
      body {
        margin: 0;
        padding: 0;
      }
      section.layout {
        margin-bottom: 50px;
        text-align: center;
        color: white;
      }
      .left {
        background-color: #65d;
      }
      .center {
        background-color: #f05;
      }
      .right {
        background-color: blue;
      }
    </style>
  </head>
  <body>
    <section class="layout flex">
      <!-- flex布局方案 -->
      <style>
        .layout.flex .page {
          display: flex;

        }
        .layout.flex .left, .layout.flex .right {
          flex: 1;
        }

        .layout.flex .center {
          width: 200px;
        }
      </style>
      <article class="page">
        <div class="left">左边自适应</div>
        <div class="center">flex布局-中间固定宽度部分</div>
        <div class="right">右边自适应</div>
      </article>
    </section>

    <section class="layout table">
      <!-- table 布局方案 -->
      <style>
        .layout.table .page {
          display: table;
          width: 100%;
        }
        .layout.table .page>div {
          display: table-cell;
        }
        .layout.table .center {
          width: 200px;
        }
      </style>
      <article class="page">
        <div class="left">左边自适应</div>
        <div class="center">table布局-中间固定宽度部分</div>
        <div class="right">右边自适应</div>
      </article>
    </section>

    <section class="layout grid">
      <!-- 网格布局方案 -->
      <style>
        .layout.grid .page {
          display: grid;
          grid-template-rows: 100%;
          grid-template-columns: auto 200px auto;
        }
      </style>
      <article class="page">
        <div class="left">左边自适应</div>
        <div class="center">
          grid布局-中间固定宽度部分
        </div>
        <div class="right">右边自适应</div>
      </article>
    </section>
  </body>
</html>
點擊查看更多內(nèi)容
4人點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質文章

正在加載中
Web前端工程師
手記
粉絲
0
獲贊與收藏
20

關注作者,訂閱最新文章

閱讀免費教程

感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優(yōu)惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號

舉報

0/150
提交
取消