分类

软件大全游戏大全软件教程游戏攻略

CSS浏览器重置代码_CSS重置代码解决方案

网页设计2026-02-01 15:54:58作者:

Chris Poteet’s CSS浏览器重置代码

这个代码能够有效地帮助大家解决跨浏览器问题。虽然不支持IE6,但是对于这种美国占有率低于1%的浏览器,大家大可以放弃。

  1. /*
  2. Reset Default Browser Styles
  3. - Place first in the listing of external style sheets for cascading.
  4. - Be sure to explicitly set margin/padding styles.
  5. - Styles are not reset that have to do with display (block, inline) are not reset.
  6. By: Chris Poteet & various influences
  7. */
  8. * {
  9. vertical-align:baseline;
  10. font-family: inherit;
  11. font-style: inherit;
  12. font-size:100%;
  13. border:none;
  14. padding:0;
  15. margin:0;
  16. }
  17. body {
  18. padding:5px;
  19. }
  20. h1, h2, h3, h4, h5, h6, p,pre, blockquote, form, ul, ol, dl {
  21. margin:20px0;
  22. }
  23. li, dd, blockquote {
  24. margin-left:40px;
  25. }
  26. dt {
  27. font-weight:bold;
  28. }
  29. table {
  30. border-collapse:collapse;
  31. border-spacing:0;
  32. }
标签

相关文章