各大厂初始化样式代码

腾讯

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 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','微软雅黑','宋体',\5b8b\4f53,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}

新浪

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

淘宝

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

优酷

 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 blockquote,body,code,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0}
 2 table{border-collapse:collapse;border-spacing:0}
 3 fieldset,img{border:0}
 4 address,caption,cite,code,dfn,em,var{font-style:normal;font-weight:400}
 5 li{list-style:none}
 6 caption,th{text-align:left}
 7 h1,h2,h3,h4,h5,h6{font-size:100%}
 8 q:after,q:before{content:''}
 9 abbr,acronym{border:0;font-variant:normal}
10 sup{vertical-align:text-top}
11 sub{vertical-align:text-bottom}
12 input,select,textarea{font-family:inherit;font-size:inherit;*font-size:100%;font-weight:inherit}
13 legend{color:#333}html{background-color:#eee}
14 body{font:400 14px/1.5 "Hiragino Sans GB","WenQuanYi Micro Hei",tahoma,sans-serif;color:#666;background-color:#fff}
15 a{color:#2bb8aa;text-decoration:none}a:hover{text-decoration:underline}
16 h1,h2,h3,h4,h5,h6{font-family:"Hiragino Sans GB"," Microsoft YaHei","WenQuanYi Micro Hei",arial,sans-serif;color:#333;-webkit-font-smoothing:antialiased}
17 input[type=password]{font-family:arial,sans-serif}

YUI

 1 YUI 3.18.1(建f7e7bcb)
 2 版权所有2014年雅虎公司保留所有权利。
 3 在BSD许可。
 4 http://yuilibrary.com/license/
 5 * /
 6 
 7 html{color:#000;background:#FFF}
 8 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}
 9 table{border-collapse:collapse;border-spacing:0}
10 fieldset,img{border:0}
11 address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}
12 ol,ul{list-style:none}
13 caption,th{text-align:left}
14 h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}
15 q:before,q:after{content:''}
16 abbr,acronym{border:0;font-variant:normal}
17 sup{vertical-align:text-top}
18 sub{vertical-align:text-bottom}
19 input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;*font-size:100%}
20 legend{color:#000}
21 #yui3-css-stamp.cssreset{display:none}
 1 @charset "utf-8";
 2 /* =reset 网页样式重置
 3 html { font-size:1em;-webkit-tap-highlight-color:rgba(0,0,0,0); -webkit-tap-highlight:rgba(0,0,0,0);-webkit-text-size-adjust:none;overflow:-moz-scrollbars-vertical;/*强制firefox出现滑动条*/}
 4 body { font-size:0.75em;}
 5 label { cursor:pointer;}
 6 a:link, a:visited { text-decoration:none;}
 7 input:focus { outline: none; }
 8 input,button,select,textarea{outline:none;/*-webkit-appearance:none;*//*强制去除表单自带的样式*/ }
 9 textarea{resize:none;/*-webkit-appearance:none;*//*强制去除textarea自带的样式*/ } 
10 input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px white inset; } /*利用阴影来填充掉input自动填充色*/
11 textarea,input,select { background: none; border:none; margin: 0; padding: 0; }  
12 a, abbr, acronym, address, applet, article, aside, audio, b, blockquote, big, body, center, canvas, caption, cite, code, command, datalist, dd, del, details, dfn, dl, div, dt, em, embed, fieldset, figcaption, figure, font, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, keygen, label, legend, li, meter, nav, menu, object, ol, output, p, pre, progress, q, s, samp, section, small, span, source, strike, strong, sub, sup, table, tbody, tfoot, thead, th, tr, tdvideo, tt,u, ul, var { margin:0; padding:0;}
13 article, aside, footer, header, hgroup, nav, section, figure, figcaption { display: block;} /*html5设置*/
14 h1, h2, h3, h4, h5, h6, th, td, table, input, button, select, textarea, sub{ font-size:1em;}
15 body, input, button, select, textarea, sub{ font-family:Arial, sans-serif;}
16 em, cite, address, optgroup { font-style:normal;}
17 kbd, samp, code { font-family:monospace;}
18 img, input, button, select, textarea { vertical-align:middle;outline:none;}
19 ul, ol { list-style:none;}
20 img, fieldset { border:0;}
21 abbr, acronym { cursor:help; border-bottom:1px dotted black;}
22 table { width:100%; border-spacing:0; border:0;}
23 table th, table td { border:0;}
24 legend, hr { overflow:hidden; position:absolute; top:0; left:0;}
25 legend, hr, caption { visibility:hidden; font-size:0; width:0; height:0; line-height:0;}
 1 html{height:100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;-webkit-font-smoothing:antialiased;}
 2 body{margin:0;padding:0;background-color:#fff;min-height:100%;height:auto !important;height:100%;text-align:center;color:#404040;font:12px/1.5 Helvetica,arial;}
 3 h1,h2,h3,h4,h5,h6,p,figure,form{margin:0;}
 4 table{border-collapse:collapse; border-spacing:0;}
 5 img{border:0;vertical-align:middle;-ms-interpolation-mode: bicubic;}
 6 a{text-decoration:none;color:#29B4F0;}
 7 a:focus {outline: thin dotted;}
 8 a:hover{color:#017CB9;text-decoration:underline;}
 9 /* hn */
10 h1{font-size:16px;line-height:36px;}
11 h2{font-size:14px;line-height:30px;}
12 h3{line-height:24px;}
13 h3,h4,h5,h6{font-size:12px;}
14 /* ul ol dl */
15 ul,li,ol{margin: 0;padding:0;list-style: none outside none;}
16 ul.has-style li,ol li{margin-left:25px;}
17 ul.has-style li{list-style:disc;}
18 ol li{list-style:decimal;}
19 ul.inline-style li{float:left;display:inline;}
20 dl{margin-bottom: 18px;}
21 dt{font-weight: bold;}
22 dd{margin:0 0 0 9px;padding:0;}
23 svg:not(:root) { overflow: hidden;}
24 /* clearfix */
25 .clearfix:before, .clearfix:after {content:""; display:table;}
26 .clearfix:after{clear:both;overflow:hidden;}
27 .clearfix{zoom:1;}

猜你喜欢

转载自www.cnblogs.com/cnlisiyiii-stu/p/11895642.html