css常用清除基础样式

/*(1)清除默认样式*/
html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img,input{ margin:0; padding:0; }
fieldset, img,input,button { border:0 none; padding:0;margin:0;outline-style:none; }   /*去掉input等聚焦时的蓝色边框*/
ul,li,ol{ list-style:none; }

/* 行内元素的垂直居中 */
/* 
vertical-align:top 

*/
select, input { vertical-align:middle;}
/*select, input, textarea { font-size:12px; margin:0; }*/
textarea { resize:none; } /*防止拖动*/
img {border:0; vertical-align:middle; }  
/*  去掉图片低测默认的3像素空白缝隙,或者用display:block也可以*/
/* table { border-collapse:collapse; } */

a {text-decoration:none; }

/*(2)添加公共样式*/
/*body {
    font:12px Arial,Verdana,"\5b8b\4f53";
    color:#666;
    background:#fff;
}*/
/*清除浮动(不管)*/
.clearfix:before,.clearfix:after {  /*清楚浮动*/
    content:"";
    display:table;
}
.clearfix:after{clear:both;}
.clearfix{
    *zoom:1;/*IE/7/6*/
}
h1,h2,h3,h4,h5,h6 {font-weight:normal;font-size:1em;}  /*设置h标签的大小,设置跟父亲一样大的字体font-size:100%;*/
s,i,em{font-style:normal;text-decoration:none;}




.clearfix:after {
    content: "";
    display: block;
    visibility: hidden;
    height: 0;
    clear: both;
}
.clearfix {
    zoom: 1;
}
a {
    text-decoration: none;
    color: black;
}
a:hover {
    text-decoration: none;
}

猜你喜欢

转载自blog.csdn.net/qq_33221699/article/details/84259658