重置浏览器默认样式

布局样式表包括显示属性,浮动,定位,宽度,高度以及边距和填充,一般命名为layout.css。

颜色样式表包括背景属性,颜色和图片以及文本颜色,一般命名为color.css。

版式信息包含了字体和字体大小,行高,字母间隔以及文本装饰,一般命名为typography.css。

为减少XHTML文档链接的样式表数量,一般习惯只是链接一个样式表。

<link rel="stylesheet" type="text/css" href="layout.css" />

然后,用@import规则来引用其他样式表。

@import url(color.css); @import url(typography.css);

重写浏览器默认样式:

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, th, td {margin: 0; padding: 0; } /* Normalizes margin, padding */
h1, h2, h3, h4, h5, h6 { font-size: 100%; } /* Normalizes font-size for headers */
ol, ul { list-style: none; } /* Remove list-style from lists */
Address, caption, cite, code, dfn, em, strong, th, var { font-family: normal; font-weight: normal; } /* Normalizes font-style and font-weight to normal */
table { border-collapse: collapse; border-spacing: 0; } 
fieldset, img { border: 0; } /* Removes border from fieldset and img */
caption, th { text-align: left; } /* Left-aligns text in caption and th */
q:before, q:after { content: ''; } /* Removes quotation marks from q */

现在还没有评论

留下您的大名