zoukankan      html  css  js  c++  java
  • 弹性盒布局-圣杯布局

    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>弹性盒-圣杯布局</title>
        <style>
            /* 顶部和底部可固定,中间部分随上下高剩余高度而变,中间两边栏固定 */
            *{
                margin: 0;
                padding: 0;
            }
            .container{
                display: flex;
                height: 100vh;
                flex-direction: column;    /*纵向排列*/
            }
            header{
                background-color: #0086B3;
            }
            section{
                flex: 1;    /*占一行*/
                display: flex;
                background-color: pink;
            }
            footer{
                background-color: #0086B3;
            }
            .left{
                background-color: red;
                flex: 0 0 100px;    /*给出左宽*/
            }
            .center{
                flex: 1;    /*独占1行*/
                background-color: pink;
            }
            .right{
                flex: 0 0 100px;    /*给出右宽*/
                background-color: red;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <header>头部</header>
            <section>
                <div class="left"></div>
                <div class="center"></div>
                <div class="right"></div>
            </section>
            <footer>底部</footer>
        </div>
    </body>
    </html>
  • 相关阅读:
    python并发编程之IO模型
    协程与concurent.furtrue实现线程池与进程池
    网络编程之线程进阶
    多线程讲解
    网络编程之进阶2
    网络编程之进阶
    网络编程之进程
    函数复习之2
    函数复习
    深克隆和浅克隆
  • 原文地址:https://www.cnblogs.com/yueranran/p/13222988.html
Copyright © 2011-2022 走看看