CSS瀏覽器重置代碼
Chris Poteet’s CSS瀏覽器重置代碼
這個(gè)代碼能夠有效地幫助大家解決跨瀏覽器問題。雖然不支持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;
- }
關(guān)鍵詞:CSS,瀏覽器
閱讀本文后您有什么感想? 已有 人給出評價(jià)!
- 1
- 1
- 1
- 1
- 1
- 1