zoukankan      html  css  js  c++  java
  • css双飞翼和圣杯布局

    <!DOCTYPE html>
    <html lang="en">
    
    <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;
            }
            .middle,.left,.right{
                float: left;
                height: 200px;
            }
            .middle{
                width: 100%;
                background:#ace;
            }
            .middle-inner{
                margin: 0 30% 0 20%;
            }
            .left{
                width: 20%;
                background:#eee;
                margin-left: -100%;
            }
            .right{
                width:30%; 
                background:#ddd;
                margin-left: -30%;
            }
        </style>
    </head>
    
    <body>
        <div>
            <div class="middle">
                <div class="middle-inner">
                    middle-inner
                </div>
            </div>
            <div class="left">
                left
            </div>
            <div class="right">
                right
            </div>
        </div>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html lang="en">
    <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{
                overflow: hidden;
                padding: 0 300px 0 200px;
            }
            .middle,.left,.right{
                float: left;
                position: relative;
                min-height: 130px;
            }
            .middle{
                width: 100%;
                background-color: red;
            }
            .left{
                left:-200px; 
                width: 200px;
                margin-left: -100%;
                background-color: beige;
            }
            .right{
                right: -300px;
                width: 300px;
                margin-left: -300px;
                background-color: aquamarine;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="middle">
                 middle
            </div>
            <div class="left">
                 left
            </div>
            <div class="right">
                 right
            </div>
        </div>
    </body>
    </html>
  • 相关阅读:
    《Android 编程权威指南》读书总结
    hadoop记录-浅析Hadoop中的DistCp和FastCopy(转载)
    Hadoop记录-queue使用率
    Hadoop记录-切换NN
    Hadoop记录-退役
    Hadoop记录-queue mysql
    Linux记录-grafana opentsdb安装
    Hadoop记录-JMX参数
    Linux记录-open-falcon开源监控系统部署
    Hadoop记录- Yarn Job MAX
  • 原文地址:https://www.cnblogs.com/cn2758/p/8243113.html
Copyright © 2011-2022 走看看