• 圣杯布局


    描述:两边的内容变化,中间的内容不变

    代码:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
            *{
                padding: 0px;
                margin: 0px;
            }
            section{
                height:300px;
                padding-left: 100px;
                padding-right: 150px;
            }
            .content{
                width: 100%;
                height: 300px;
                background-color: red;
                float: left;
            }
            .left{
                width: 100px;
                height:300px;
                background-color: yellow;
                float: left;
                margin-left: -100%;
                position: relative;
                left: -100px;
            }
            .right{
                width: 150px;
                height: 300px;
                background-color: blue;
                float: left;
                margin-left: -150px;
                position: relative;
                left: 150px;
            }
        </style>
    </head>
    <body>
    <section>
        <div class="content"></div>
        <div class="left"></div>
        <div class="right"></div>
    </section>
    </body>
    </html>
  • 相关阅读:
    模拟黑客入侵,恶搞小伙伴的利器
    牛客网算法竞赛难题
    ybt ——1346【例4-7】亲戚
    FBI树
    noi2020第二题
    noi2020第一题
    Happiness
    YiJuWuLiaoDeHua
    挂掉了一个u盘
    NOIp2020
  • 原文地址:https://www.cnblogs.com/mmykdbc/p/6200986.html
Copyright © 2020-2023  润新知