zoukankan      html  css  js  c++  java
  • html5 css练习 定位布局

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>浮动布局</title>
        <link rel="stylesheet" type="text/css" href="st1.css">
    </head>
    <body>
    <header>头部内容</header>
    <aside>侧栏导航</aside>    
    <section>主体内容</section>
    <footer>底部</footer>
    </body>
    </html>

    /*定位布局*/
    *{
        margin: 0;
        padding: 0;
    }
    body{
         960px;
        margin: 0 auto;
        position: relative;
    }
    header{
         960px;
        height: 150px;
        background: rgba(0,0,0,0.3);
        
    }
    aside{
         200px;
        height: 500px;
        background: rgba(200,20,20,0.8);
        
    }
    section{
         760px;
        height: 500px;
        background: rgba(20,200,20,0.8);
        position: absolute;
        right: 0;
        top: 150px;
    }
    footer{
         960px;
        height: 150px;
        background: rgba(60,60,60,0.6);    
    }

    天道酬勤,厚积薄发。 君子之行,静以修身,俭以养德。 非淡泊无以明志,非宁静无以致远。 如有恒,何须三更起,半夜眠;最怕莫,三天打鱼两天晒网,竹篮打水一场空。
  • 相关阅读:
    数据库客户端们
    tcl调用tuxedo的一个demo
    tcl实现http请求
    CHAP算法C++实现
    归一化数值
    PPPoE名词解释
    Prism MEF example
    为什么我们要开源
    WPF Issues
    WPF & EF & Prism useful links
  • 原文地址:https://www.cnblogs.com/houweidong/p/9757011.html
Copyright © 2011-2022 走看看