DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> CSS詳解 >> 主流浏覽器CSS Reset的方法(5)
主流浏覽器CSS Reset的方法(5)
編輯:CSS詳解     
AnIEto2KReset CSS

  1. Html,body,div,span,applet,object,iframe,
  2. h1,h2,h3,h4,h5,h6,p,
  3. blockquote,pre,a,abbr,acronym,address,big,
  4. cite,code,del,dfn,em,font,img,
  5. ins,kbd,q,s,samp,small,strike,
  6. strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,
  7. fIEldset,form,label,legend,
  8. table,caption,tbody,tfoot,thead,tr,th,td,
  9. center,u,b,i{
  10. margin:0;
  11. padding:0;
  12. border:0;
  13. outline:0;
  14. font-weight:normal;
  15. font-style:normal;
  16. font-size:100%;
  17. font-family:inherit;
  18. vertical-align:baseline
  19. }
  20. body{
  21. line-height:1
  22. }
  23. :focus{
  24. outline:0
  25. }
  26. ol,ul{
  27. list-style:none
  28. }
  29. table{
  30. border-collapse:collapse;
  31. border-spacing:0
  32. }
  33. blockquote:before,blockquote:after,q:before,q:after{
  34. content:""
  35. }
  36. blockquote,q{
  37. quotes:""""
  38. }
  39. input,textarea{
  40. margin:0;
  41. padding:0
  42. }
  43. hr{
  44. margin:0;
  45. padding:0;
  46. border:0;
  47. color:#000;
  48. background-color:#000;
  49. height:1px
  50. }

CSSLabCSS Reset

  1. Html,body,div,span,applet,object,iframe,h1,h2,h3,
  2. h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,
  3. big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,
  4. small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,
  5. fIEldset,form,label,legend,table,caption,tbody,tfoot,
  6. thead,tr,th,td{
  7. margin:0;
  8. padding:0;
  9. border:0;
  10. outline:0;
  11. font-weight:inherit;
  12. font-style:inherit;
  13. font-size:100%;
  14. font-family:inherit;
  15. vertical-align:baseline;
  16. }
  17. :focus{
  18. outline:0;
  19. }
  20. table{
  21. border-collapse:separate;
  22. border-spacing:0;
  23. }
  24. caption,th,td{
  25. text-align:left;
  26. font-weight:normal;
  27. }
  28. aimg,iframe{
  29. border:none;
  30. }
  31. ol,ul{
  32. list-style:none;
  33. }
  34. input,textarea,select,button{
  35. font-size:100%;
  36. font-family:inherit;
  37. }
  38. select{
  39. margin:inherit;
  40. }
  41. /*Fixesincorrectplacementofnumbersinol’sinIE6/7*/
  42. ol{margin-left:2em;}
  43. /*==clearfix==*/
  44. .clearfix:after{
  45. content:".";
  46. display:block;
  47. height:0;
  48. clear:both;
  49. visibility:hidden;
  50. }
  51. .clearfix{display:inline-block;}
  52. *Html.clearfix{height:1%;}
  53. .clearfix{display:block;}

像你看到的,這些都大同小異,需求不同,方法也就不同。我自己偏向於喜歡Yahoo的CSS Reset,也用了Yahoo的代碼。你,有自己的CSS Reset體系嗎?或許可以分享出來!

CSS Reset代碼來源:10TécnicASParaResetCSS

 

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved