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

    //圣杯布局-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>
    
  • 相关阅读:
    超市账单管理系统设计思路
    Hibernate之Query.uniqueResult()结果为数值的注意事项
    Hibernate之Query.uniqueResult()结果为数值的注意事项
    Struts2加载自定义库注意事项
    135编辑器使用方法
    SQLite – ORDER 子句
    Readings
    自己常用的导航工具
    Spring中的事件处理
    iOS-Runtime
  • 原文地址:https://www.cnblogs.com/leyi/p/4752283.html
Copyright © 2011-2022 走看看