Blogger Information
Blog 12
fans 0
comment 0
visits 10514
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
双飞翼布局和圣杯布局8月20日17:00
A骆长林的博客
Original
802 people have browsed it

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>比翼双飞布局</title>
    <style type="text/css">
        .header,.footer{width: 100%;height: 60px;background-color: dimgray;}
        .content{width:1000px;min-height: 100%;text-align: center;line-height: 60px;
            background-color: #2A98FF;margin: auto;}
        .container{width: 1000px;margin: auto;background-color: yellow;overflow: hidden;}
        .wrap{width: 100%;float: left;background-color: rebeccapurple;}
        .main{min-height: 600px;background-color: wheat;margin: 0 200px;}
        .left{width: 200px;float: left;min-height: 600px;background-color: chartreuse;margin-left: -1000px;}
        .right{width: 200px;float: left;min-height: 600px;background-color: red;margin-left: -200px;}
        .footer{
            clear: both;}
    </style>
</head>
<body>
<div class="header">
    <div class="content">网站头部</div>
</div>

<!-- 主体 -->
<div class="container">

    <div class="wrap">
        <div class="main">主体内容区</div>
    </div>

    <div class="left">左侧</div>

    <div class="right">右侧</div>
</div>

<!-- 底部 -->
<div class="footer">
    <div class="content">网站底部</div>
</div>

</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>圣杯布局</title>
    <style type="text/css">
        .header,.footer{width:100%;height: 60px;background-color:
        ;}
        .content{width: 1000px;text-align: center;line-height:60px;
            margin: auto;background-color:hotpink}
        .container{width: 600px;margin: auto;overflow: hidden;
        background-color: navajowhite;padding: 0 200px;}
        .main{width:100%;background-color: #2A98FF;float: left;
            min-height: 600px;
        }
        .left{width: 200px;background-color: chartreuse;float: left;
            min-height: 600px;margin-left: -100%;
                position: relative;
            left:-200px;
            }
        .right{width: 200px;background-color: blue;float: left;
            min-height: 600px;
           margin-left: -200px;
            position: relative;
            right:-200px;
            }
        .footer{
            clear: both;}
    </style>
</head>
<body>
<div class="header">
    <div class="content">网站头部</div>
</div>

<!-- 内容区 -->
<div class="container">
    <div class="main">主体</div>
    <div class="left">左侧</div>
    <div class="right">右侧</div>
</div>

<!-- 底部 -->
<div class="footer">
    <div class="content">网站底部</div>
</div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments