CSS常用重置代码

来源:互联网 发布:js清空变量中的内容 编辑:程序博客网 时间:2024/05/09 04:48

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,th,td,p,pre,
form,input,textarea,fieldset,blockquote{
    padding: 0;
    margin: 0;
}


table {
    border-collapse: collapse; /*table默认上下两格重叠添加,该属性避免重叠添加*/
    border-spacing: 0; /*table默认格与格之间有空隙,该属性是去掉空隙*/
}


ol,ul {
    list-style:none;
}


fieldset,img,abbr,acronym{
    border:0;
}

q:before,q:after {
    content:”;
}
/*字体相关*/
address,caption,cite,code,dfn,em,strong,th,var {
    font-weight: normal; /*strong,th等属性默认的加粗,该属性是去掉默认加粗*/
    font-style: normal; /*adress,cite,dfn,em,var等属性默认的倾斜,该属性是去掉默认倾斜*/
}
h1,h2,h3,h4,h5,h6 {
    font-weight: normal;
    font-size: 100%; /*这两个属性让标题标签样式达到一致*/
}
/*字体相关*/

/*清除浮动*/

.clearfix:after{
    content:".";
    display:block;
    height:0;
    clear:both;
    visibility:hidden
}
.clearfix{
    *+height:1%;
}

/*清除浮动*/

http://www.cnblogs.com/Timac/archive/2011/09/07.html