css重置样式

重置样式

 1 @charset "utf-8";
 2 html,body,ol,ul,li,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:0;padding:0;}
 3 body{font-size:16px;font-family: '微软雅黑';}
 4 ul,ol,li{list-style:none;}
 5 h1,h2,h3,h4,h5,h6{font-size:16px;font-weight: normal;}
 6 b,strong{ font-weight: normal;}
 7 i,em{font-style: normal;}
 8 a,u{text-decoration: none;}
 9 img{border:0;display:block;}
10 input,fieldset{outline: none; border:0;}
11 .clear_fix:after{content:'.';clear:both;height:0;overflow:hidden;display:block;visibility: hidden;}
12 .clear_fix{zoom:1;}

常见网站重置样式

 腾讯

1 body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select{margin:0;padding:0}
2 body{font:12px "宋体","Arial Narrow",HELVETICA;background:#fff;-webkit-text-size-adjust:100%}
3 a{color:#172c45;text-decoration:none}
4 a:hover{color:#cd0200;text-decoration:underline}
5 em{font-style:normal}
6 li{list-style:none}
7 img{border:0;vertical-align:middle}
8 table{border-collapse:collapse;border-spacing:0}
9 p{word-wrap:break-word}

淘宝

 1 body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { margin:0; padding:0; }
 2 body, button, input, select, textarea { font:12px/1.5tahoma, arial, 5b8b4f53; }
 3 h1, h2, h3, h4, h5, h6{ font-size:100%; }
 4 address, cite, dfn, em, var { font-style:normal; }
 5 code, kbd, pre, samp { font-family:couriernew, courier, monospace; }
 6 small{ font-size:12px; }
 7 ul, ol { list-style:none; }
 8 a { text-decoration:none; }
 9 a:hover { text-decoration:underline; }
10 sup { vertical-align:text-top; }
11 sub{ vertical-align:text-bottom; }
12 legend { color:#000; }
13 fieldset, img { border:0; }
14 button, input, select, textarea { font-size:100%; }
15 table { border-collapse:collapse; border-spacing:0; }

网易

 1 html {overflow-y:scroll;}
 2 body {margin:0; padding:0; font:12px/1.5 5b8b4f53,Arial,sans-serif;/*background:#ffffff;*/}
 3 div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p{padding:0; margin:0;}
 4 table,td,tr,th{font-size:12px;}
 5 ol,ul {list-style:none;}
 6 li{list-style-type:none;}
 7 img{vertical-align:top;border:0;}
 8 h1,h2,h3,h4,h5,h6{font-size:inherit; font-weight:normal;}
 9 address,cite,code,em,th,i{font-weight:normal; font-style:normal;}
10 .hx a,.hx em,.fB{font-weight:bold;}
11 .clearfix{*zoom:1;}
12 .clearfix:after{display:block; overflow:hidden; clear:both; height:0; visibility:hidden; content:".";}
13 a {color:#252525; text-decoration:none;}
14 a:visited {text-decoration:none;}
15 a:hover {color:#ba2636;text-decoration:underline;}
16 a:active {color:#ba2636;}

搜狐

 1 body{font-family:"5B8B4F53","Arial Narrow",HELVETICA;text-align:center;margin:0 auto;padding:0;background:#FFF;font-size:12px;color:#333;}
 2 body > div{text-align:center;margin-right:auto;margin-left:auto;} 
 3 div,form,ul,ol,li,span,p{margin:0;padding:0;border:0;}
 4 img,a img{border:0;margin:0;padding:0;}
 5 h1,h2,h3,h4,h5,h6{margin:0;padding:0;font-size:12px;font-weight:normal;}
 6 ul,ol,li{list-style:none}
 7 table,td,input{font-size:12px;padding:0}
 8 /* 默认链接颜色 */
 9 a{outline-style:none;color:#333;text-decoration:none}
10 a:hover{color:#c00;text-decoration:underline;}
11 /*清除链接虚框*/
12 /*a,area {blr:expression(this.onFocus=this.blur()) }  for IE 
13 :focus {-moz-outline-style: none; }  for Firefox  */

新浪

 1 html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img { margin:0; padding:0; }
 2 fieldset, img { border:none; }
 3 img{display: block;}
 4 address, caption, cite, code, dfn, th, var { font-style:normal; font-weight:normal; }
 5 ul, ol { list-style:none; }
 6 input { padding-top:0; padding-bottom:0; font-family: "SimSun","宋体";}
 7 input::-moz-focus-inner { border:none; padding:0; }
 8 select, input { vertical-align:middle; }
 9 select, input, textarea { font-size:12px; margin:0; }
10 input[type="text"], input[type="password"], textarea { outline-style:none; -webkit-appearance:none; }
11 textarea { resize:none; }
12 table { border-collapse:collapse; }
13 body { color:#333; padding:5px 0; font:12px/20px "SimSun","宋体","Arial Narrow",HELVETICA; background:#fff;/* overflow-y:scroll;*/ }
14 .clearfix:after { content:"."; display:block; height:0; visibility:hidden; clear:both; }
15 .clearfix { zoom:1; }
16 .clearit { clear:both; height:0; font-size:0; overflow:hidden; }

优酷

 1 @charset "utf-8"
 2 article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}
 3 audio,canvas,video{display:inline-block;*display:inline;*zoom:1}
 4 audio:not([controls]){display:none}
 5 html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
 6 a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}
 7 a:hover,a:active{outline:0}
 8 figure{padding:0;margin:0}
 9 sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}
10 sup{top:-0.5em}
11 sub{bottom:-0.25em}
12 img{vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}
13 button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}
14 button,input{*overflow:visible;line-height:normal}
15 button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}
16 button,input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
17 input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}
18 input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}
19 textarea{overflow:auto;vertical-align:top}
20 ol,ul,dl{list-style:none}
21 body,p,ol,ul,dl{padding:0;margin:0}
22 a:link,a:visited{text-decoration:none;color:#555}
23 a:hover{color:#c31}
24 a.white{color:#fff}
25 a.blue{color:#3399e0}

百度

 1 body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0}
 2 html{color:#000;overflow-y:scroll;overflow:-moz-scrollbars-vertical}
 3 body,button,input,select,textarea{font-size:12px;font-family:arial,'Hiragino Sans GB','Microsoft Yahei','微软雅黑','宋体',5b8b4f53,Tahoma,Arial,Helvetica,STHeiti}
 4 h1,h2,h3,h4,h5,h6{font-size:100%}
 5 em{font-style:normal}
 6 small{font-size:12px}
 7 ul,ol{list-style:none}
 8 a{text-decoration:none}
 9 a:hover{text-decoration:underline}
10 legend{color:#000}
11 fieldset,img{border:0}
12 button,input,select,textarea{font-size:100%}
13 table{border-collapse:collapse;border-spacing:0}
14 img{-ms-interpolation-mode:bicubic}
15 textarea{resize:vertical}
16 .left{float:left}
17 .right{float:right}
18 .overflow{overflow:hidden}
19 .hide{display:none}
20 .block{display:block}
21 .inline{display:inline}
22 .error{color:#F00;font-size:12px}
23 label,button{cursor:pointer}
24 .clearfix:after{content:'20';display:block;height:0;clear:both}
25 .clearfix{zoom:1}.clear{clear:both;height:0;line-height:0;font-size:0;visibility:hidden;overflow:hidden}
26 .wordwrap{word-break:break-all;word-wrap:break-word}
27 pre.wordwrap{white-space:pre-wrap}
28 body{text-align:center}
29 body,form{position:relative}
30 td{text-align:left}
31 img{border:0} 
原文地址:https://www.cnblogs.com/my12-28/p/11568664.html