常用的简单 CSS布局

来源:互联网 发布:宏观对冲 知乎 编辑:程序博客网 时间:2024/05/28 15:07
body
{
    font
: 12px "宋体";
    margin
: 0px;
    background
: #FFF;
}

  
/*页面层容器*/ #Container
{
    width
: 100%;
    background-color
: #ffffff;
}

  
/*页面头部*/ #Header
{
    width
: 960px;
    margin
: 0 auto;
    background
: #ffffff;
    background-color
: #FFFFFF;
}

/*页面主体
#PageBody
{
    width: 960px;
    margin: 0 auto;
    height: 400px;
    background-color: #FFFFFF;
    border-right: silver thin solid;
    border-top: silver thin solid;
    border-left: silver thin solid;
    border-bottom: silver thin solid;
}
*/

/*侧边栏*/
#Sidebar
{
    background-color
: #FFFFFF;
    width
: 200px;
    margin
: 0;
    float
: left;
    text-align
: left;
    overflow
: auto;
}

/*主体内容*/
#MainBody
{
    background
: #eeeeee;
    width
: 760px;
    margin
: 15;
    float
: right;
    overflow
: auto;
    text-align
: left;
}

/*页面底部*/
#Footer
{
    width
: 960px;
    margin
: 0 auto;
    background
: #eeeeee;
    font-size
: 12px;
    text-align
: center;
}
 
原创粉丝点击