CSS浏览器重置代码
Chris Poteet’s CSS浏览器重置代码
这个代码能够有效地帮助大家解决跨浏览器问题。虽然不支持IE6,但是对于这种美国占有率低于1%的浏览器,大家大可以放弃。
- /*
- Reset Default Browser Styles
- - Place first in the listing of external style sheets for cascading.
- - Be sure to explicitly set margin/padding styles.
- - Styles are not reset that have to do with display (block, inline) are not reset.
- By: Chris Poteet & various influences
- */
- * {
- vertical-align: baseline;
- font-family: inherit;
- font-style: inherit;
- font-size: 100%;
- border: none;
- padding: 0;
- margin: 0;
- }
- body {
- padding: 5px;
- }
- h1, h2, h3, h4, h5, h6, p, pre, blockquote, form, ul, ol, dl {
- margin: 20px 0;
- }
- li, dd, blockquote {
- margin-left: 40px;
- }
- dt {
- font-weight: bold;
- }
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
关键词:CSS,浏览器
阅读本文后您有什么感想? 已有 人给出评价!
- 1
- 1
- 1
- 1
- 1
- 1