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

    <!DOCTYPE html>
    <html>
    <head lang="en">
        <meta charset="UTF-8">
        <title></title>
        <style>
            .main
            {
                 100%;
                background-color: black;
                min-height: 30px;
                float: left;
                color: white;
            }
            .left
            {
                 130px;
                background: red;
                min-height: 30px;
                margin-left: -100%;
                float: left;
    
            }
            .right {
                 290px;
                background: yellow;
                min-height: 30px;
                float: left;
                margin-left: -290px;
            }
            .text
            {
                margin-left: 130px;
                margin-right: 290px;
            }
        </style>
    </head>
    <body>
    <div class="wrap">
        <div class="main"><div class="text">主要的我是主要的我是主要的我是主要的我是主要的</div>
        </div>
        <div class="left">
        </div>
        <div class="right">
        </div>
    </div>
    </body>
    </html>
    

      上面这个是双飞翼布局,下面是圣杯布局

    <!DOCTYPE html>
    <html>
    <head lang="en">
        <meta charset="UTF-8">
        <title></title>
        <style>
            .wrap
            {
                padding-left:130px;
                padding-right: 290px;
            }
            .main
            {
                width: 100%;
                background-color: black;
                min-height: 30px;
                float: left;
                color: white;
            }
            .left
            {
                width: 130px;
                background: red;
                min-height: 30px;
                margin-left: -100%;
                position: relative;
                left: -130px;
                float: left;
    
            }
            .right {
                width: 290px;
                background: yellow;
                min-height: 30px;
                margin-left: -290px;
                right: -290px;
                position: relative;
                float: left;
    
            }
    
        </style>
    </head>
    <body>
    <div class="wrap">
        <div class="main">主要的我是主要的我是主要的我是主要的我是主要的
        </div>
        <div class="left">
        </div>
        <div class="right">
        </div>
    </div>
    </body>
    </html>
  • 相关阅读:
    学习之路-前端-笔记-一、HTML笔记
    抄写例题作业1
    郭霖
    java遍历HashMap的高效方法
    Add Two Numbers II 两个数字相加之二
    基于socket的简单p2p聊天项目
    SimpleScalar Course Project
    Dijkstra Java
    PCA vs Linear Regression 可视化理解
    机器学习中的范数规则化之(一)L0、L1与L2范数
  • 原文地址:https://www.cnblogs.com/zhuni/p/5228138.html
Copyright © 2011-2022 走看看