网页布局技巧:CSS文件设计初始化代码

来源:互联网 发布:时时彩平台源码出租 编辑:程序博客网 时间:2024/06/16 06:16
网页布局技巧:CSS文件设计初始化代码(css设计模板)

    1.
    charset ”utf-8″;
    html {background:url(/www/pic/head_back.gif) repeat-x top #FFF}
    body {width:920px;font:12px Arial;margin:0 auto;padding:0;color:#000;}
    a{color:#000; text-decoration:none}
    a:hover {color:#f00; text-decoration:underline}
    ul,ol,p,dl{margin:0;padding:0}
    ul,ol,dl{height:100%;overflow:hidden}
    li{list-style:none}
    img {border:none}
    h1,h2,h3,h4{font:12px Verdana;margin:0;padding:0}
    input {font:12px Verdana}
    2.

    /*为背景定义了颜色*/
    /*html {
    color:#000;
    background:#FFF;
    }*/
    body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {
    margin:0;
    padding:0;
    }
    /*合并边线,边线空间至零.*/
    table {
    border-collapse:collapse;
    border-spacing:0;
    }
    /*清除边线*/
    fieldset, img {
    border:0;
    }
    address, caption, cite, code, dfn, em, strong, th, var {
    font-style:normal;
    font-weight:normal;
    }
    li {
    list-style:none;
    }
    caption, th {
    text-align:left;
    }
    h1, h2, h3, h4, h5, h6 {
    font-size:100%;
    font-weight:normal;
    }
    /*添加空字符清除融合*/
    q:before, q:after {
    content:”;
    }
    abbr, acronym {
    border:0;
    font-variant:normal;
    }
    /* to preserve line-height and selector appearance */
    sup {
    vertical-align:text-top;
    }
    sub {
    vertical-align:text-bottom;
    }
    input, textarea, select {
    font-family:inherit;
    font-size:inherit;
    font-weight:inherit;
    }
    /*to enable resizing for IE*/
    /*在ie下重定义*/
    input, textarea, select {
    *font-size:100%;
    }
    /*because legend doesn’t inherit in IE */
    /*IE下legend不继承 */
    legend {
    color:#000;

    }


原文地址:http://www.mianfeimoban.com/jianzhang_cyruanjian/cssjc/20120319/10873.html 欢迎转载!


原创粉丝点击