reset.css

  1. /* http://meyerweb.com/eric/tools/css/reset/
  2. v2.0 | 20110126
  3. License: none (public domain)
  4. */
  5. html, body, div, span, applet, object, iframe,
  6. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  7. a, abbr, acronym, address, big, cite, code,
  8. del, dfn, em, img, ins, kbd, q, s, samp,
  9. small, strike, strong, sub, sup, tt, var,
  10. b, u, i, center,
  11. dl, dt, dd, ol, ul, li,
  12. fieldset, form, label, legend,
  13. table, caption, tbody, tfoot, thead, tr, th, td,
  14. article, aside, canvas, details, embed,
  15. figure, figcaption, footer, header, hgroup,
  16. menu, nav, output, ruby, section, summary,
  17. time, mark, audio, video {
  18. margin: 0;
  19. padding: 0;
  20. border: 0;
  21. font-size: 100%;
  22. font: inherit;
  23. vertical-align: baseline;
  24. }
  25. /* HTML5 display-role reset for older browsers */
  26. article, aside, details, figcaption, figure,
  27. footer, header, hgroup, menu, nav, section {
  28. display: block;
  29. }
  30. body {
  31. line-height: 1;
  32. }
  33. ol, ul {
  34. list-style: none;
  35. }
  36. blockquote, q {
  37. quotes: none;
  38. }
  39. blockquote:before, blockquote:after,
  40. q:before, q:after {
  41. content: '';
  42. content: none;
  43. }
  44. table {
  45. border-collapse: collapse;
  46. border-spacing: 0;
  47. }

淘宝官网 样式初始化

  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. img { border:0; }
  14. button, input, select, textarea { font-size:100%; }
  15. table { border-collapse:collapse; border-spacing:0; }
  16. .cl:after{
  17. content:"";
  18. display:block;
  19. overflow:hidden;
  20. clear:both;
  21. height:0;
  22. visibility:hidden;
  23. }
  24. .cl{
  25. zoom:1;
  26. }
  27. .Flex{
  28. display: flex;
  29. display: -webkit-box;
  30. display: -moz-box;
  31. display: -webkit-flex;
  32. display: -moz-flex;
  33. display: -ms-flexbox;
  34. }

腾讯默认样式

  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:#2d374b;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}
  10. .cl:after{
  11. content:"";
  12. display:block;
  13. overflow:hidden;
  14. clear:both;
  15. height:0;
  16. visibility:hidden;
  17. }
  18. .cl{
  19. zoom:1;
  20. }
  21. .Flex{
  22. display: flex;
  23. display: -webkit-box;
  24. display: -moz-box;
  25. display: -webkit-flex;
  26. display: -moz-flex;
  27. display: -ms-flexbox;
  28. }

雅虎工程师提供的CSS初始化示例代码

  1. body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }
  2. body { background:#fff; color:#555; font-size:14px; font-family: Verdana, Arial, Helvetica, sans-serif; }
  3. td,th,caption { font-size:14px; }
  4. h1, h2, h3, h4, h5, h6 { font-weight:normal; font-size:100%; }
  5. address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal;}
  6. a { color:#555; text-decoration:none; }
  7. a:hover { text-decoration:underline; }
  8. img { border:none; }
  9. ol,ul,li { list-style:none; }
  10. input, textarea, select, button { font:14px Verdana,Helvetica,Arial,sans-serif; }
  11. table { border-collapse:collapse; }
  12. html {overflow-y: scroll;}
  13. .clearfix:after {content: "."; display: block; height:0; clear:both; visibility: hidden;}
  14. .clearfix { *zoom:1; }
  15. .Flex{
  16. display: flex;
  17. display: -webkit-box;
  18. display: -moz-box;
  19. display: -webkit-flex;
  20. display: -moz-flex;
  21. display: -ms-flexbox;
  22. }

新浪官网 样式初始化

  1. body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div{margin:0;padding:0;border:0;}
  2. body{background:#fff;color:#333;font-size:12px; margin-top:5px;font-family:"SimSun","宋体","Arial Narrow";}
  3. ul,ol{list-style-type:none;}
  4. select,input,img,select{vertical-align:middle;}
  5. a{text-decoration:none;}
  6. a:link{color:#009;}
  7. a:visited{color:#800080;}
  8. a:hover,a:active,a:focus{color:#c00;text-decoration:underline;}
  9. .cl:after{
  10. content:"";
  11. display:block;
  12. overflow:hidden;
  13. clear:both;
  14. height:0;
  15. visibility:hidden;
  16. }
  17. .cl{
  18. zoom:1;
  19. }
  20. .Flex{
  21. display: flex;
  22. display: -webkit-box;
  23. display: -moz-box;
  24. display: -webkit-flex;
  25. display: -moz-flex;
  26. display: -ms-flexbox;
  27. }

网易官网 样式初始化

  1. html {overflow-y:scroll;}
  2. body {margin:0; padding:29px00; font:12px"\5B8B\4F53",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. li{list-style-type:none;}
  6. img{vertical-align:top;border:0;}
  7. ol,ul {list-style:none;}
  8. h1,h2,h3,h4,h5,h6{font-size:12px; font-weight:normal;}
  9. address,cite,code,em,th {font-weight:normal; font-style:normal;}
  10. .cl:after{
  11. content:"";
  12. display:block;
  13. overflow:hidden;
  14. clear:both;
  15. height:0;
  16. visibility:hidden;
  17. }
  18. .cl{
  19. zoom:1;
  20. }
  21. .Flex{
  22. display: flex;
  23. display: -webkit-box;
  24. display: -moz-box;
  25. display: -webkit-flex;
  26. display: -moz-flex;
  27. display: -ms-flexbox;
  28. }