结合Normalize CSS,Reset CSS, Base CSS, Html5 Reset Css整理了一份新的样式,我这里暂把他叫做HTML5 的Reset CSS 和Base CSS的结合。下面把相应的代码贴出来以供大家一起探讨。
/** *Remove Spacing */body,dl,dd,ul,ol,figure ,h1,h2,h3,h4,h5,h6,p,pre,blockquote, form ,fieldset,legend ,input,button,select,textarea { margin: 0; padding: 0; }/* * Add block display for HTML5 elements * Corrects block display not defined in IE6/7/8/9 & FF3 */article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }/* ============================================================================= Typography ========================================================================== *//* * Add bottom border * Corrects styling not present in IE7/8/9 S5 Chrome */abbr[title], dfn[title] { border-bottom: 1px dotted; cursor:help; }/* * Define font family as monospace * Corrects font family set oddly in IE6 S5 C10 * en.wikipedia.org/wiki/User:Davidgothberg/Test59 */pre, code, kbd, samp { font-family: monospace, sans-serif; _font-family: 'Courier New', monospace, sans-serif; font-size: 1em; }/* * Add line wrapping * Improves readability of pre-formatted text in all browsers */pre { white-space: pre;/*CSS2*/ white-space: pre-wrap;/*CSS2.1*/ white-space: pre-line;/*CSS3*/ word-wrap: break-word;/*IE*/}/* * Remove quotes * 1. Addresses CSS quotes not supported in IE6/7 * 2. Addresses quote attributes not supported in S4 */blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }/* * Define font size * Improves appearance in all browsers */small { font-size: 75%; }/* * Define font size and alignment * Improves appearance without affecting line-height in all browsers * gist.github.com/413930 */sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; }/*Clear floats *The Magnificent CLEARFIX:Updated fo prevent margin-collapsing on child elements */.clearfix:before, .clearfix:after { content:"