zoukankan      html  css  js  c++  java
  • 布局方式-表格布局

    普通的表格布局
    <style>
      .table {
        display: table;
        width: 800px;
        height: 200px;
      }
      .table-row {
        display: table-row;
      }
      .table-cell {
        vertical-align: middle;
        display: table-cell;
      }
      .left {
        background: red;
      }
      .right {
        background: blue;
      }
    </style>
    <body>
      <div class="table">
        <div class="table-row">
          <div class="left table-cell"></div>
          <div class="right table-cell"></div>
        </div>
      </div>
    </body>
    三栏布局-表格布局
    <style media="screen">
      html *{
        padding: 0;
        margin: 0;
      }
      .layout article div{
        min-height: 100px;
      }
    </style>
    <body>
      <section class="layout table">
        <style>
          .layout.table .left-center-right {
            width: 100%;
            display: table;
            height: 100px;
          }
          .layout.table .left-center-right>div {
            display: table-cell;
          }
          .layout.table .left {
            width: 300px;
            background: red;
          }
          .layout.table .center {
            background: yellow;
          }
          .layout.table .right {
            width: 300px;
            background: blue;
          }
        </style>
        <article class="left-center-right">
          <div class="left"></div>
          <div class="center">
            <h2>表格布局</h2>
          </div>
          <div class="right"></div>
        </article>
      </section>
    </body>
  • 相关阅读:
    小程序历程
    关于两个字符串用加号连接
    关于数据类型的取值范围的理解
    求最小公倍数和最大公约数
    js关于两个字符串的加减乘除运算
    a:hover + 兄弟选择器(标签选择)失效的解决方法
    ul和li标签实现列表
    小图标的使用(插入icon图标)
    水平垂直居中
    【转】JMeter学习(三十七)Jmeter录制手机app脚本
  • 原文地址:https://www.cnblogs.com/wzndkj/p/10350426.html
Copyright © 2011-2022 走看看