• 圣杯和双飞翼布局


    //圣杯布局-wrap设置padding/left right加相对定位

    <!DOCTYPE html>
    <html lang="zh-CN">
    <html>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <title></title>
        <style>
            *{margin:0; padding:0;}
            .wrap{padding:0 200px; overflow: hidden}
            .main{100%; background:#57ccb1; float:left; height:100px;}
            .left{ float:left;margin-left:-100%;  200px; height:100px; background:#ff3f27; position:relative; left:-200px;}
            .right{ float:left;margin-left:-200px;  200px; height:100px; background:#fbb800; position:relative;right:-200px;}
        </style>
    </head>
    <body>
    
    <div class="wrap">
        <div class="main">main</div>
        <div class="left">left</div>
        <div class="right">right</div>
    </div>
    
    </body>
    </html>
    

    //双飞翼布局-在main中嵌套一层设置margin

    <!DOCTYPE html>
    <html lang="zh-CN">
    <html>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <title></title>
        <style>
            *{margin:0; padding:0;}
            .main{100%; background:#57ccb1; float:left; height:100px;}
            .left{ float:left;margin-left:-100%;opacity:0.4;  200px; height:100px; background:#ff3f27; }
            .right{ float:left;margin-left:-200px;opacity:0.4;  200px; height:100px; background:#fbb800; }
            .main_con{margin-left:200px; margin-right:200px;}
        </style>
    </head>
    <body>
    
    <div class="wrap">
        <div class="main">
            <div class="main_con">main</div>
        </div>
        <div class="left">left</div>
        <div class="right">right</div>
    </div>
    
    </body>
    </html>
    
  • 相关阅读:
    python——numpy模块
    python——xlrd、xlwt、xlutils模块
    python——json&pickle模块
    python——sys模块
    python——os模块
    python——random模块
    python——time模块
    linux命令 pwd
    linux 里面ls命令!!
    校花网图片爬取
  • 原文地址:https://www.cnblogs.com/leyi/p/4752283.html
Copyright © 2020-2023  润新知