[转载]CSS Tools: Reset CSS

http://meyerweb.com/eric/tools/css/reset/

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you‘re interested. Reset styles quite often appear in CSS frameworks, and the original "meyerweb reset" found its way into Blueprint, among others.

The reset styles given here are intentionally very generic. There isn‘t any default color or background set for the body element, for example. I don‘t particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline. Fill in your preferred colors for the page, links, and so on.

In other words, this is a starting point, not a self-contained black box of no-touchiness.

If you want to use my reset styles, then feel free! It‘s all explicitly in the public domain (I have to formally say that or else people ask me about licensing). You can grab a copy of the file to use and tweak as fits you best. If you‘re more of the copy-and-paste type, or just want an in-page preview of what you‘ll be getting, here it is.

/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: ‘‘;
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

Previous Versions

  1. v1.0 (200802)

Acknowledgments

Thanks to Paul Chaplin for the blockquote / q rules.

时间: 2024-10-25 14:53:39

[转载]CSS Tools: Reset CSS的相关文章

CSS Tools: Reset CSS

样式初始化 1 /* http://meyerweb.com/eric/tools/css/reset/ 2 v2.0 | 20110126 3 License: none (public domain) 4 */ 5 6 html, body, div, span, applet, object, iframe, 7 h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 a, abbr, acronym, address, big, cite, code,

CSS重置 reset.css

1. [文件] reset.css ~/*------------------------------------------* site:ifnoif.net* Style author:ifnoif* updated date:2014.08.13------------------------------------------*/ body,nav,dl,dt,dd,p,h1,h2,h3,h4,ul,ol,li,input,button,textarea,footer {    marg

Reset CSS:只选对的,不选"贵"的

玉伯和正淳一起整理的一份 reset.css: 1 /* 2 KISSY CSS Reset 3 理念:清除和重置是紧密不可分的 4 特色:1.适应中文 2.基于最新主流浏览器 5 维护:玉伯([email protected]), 正淳([email protected]) 6 */ 7 8 /* 清除内外边距 */ 9 body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 10 dl,

CSS重置(css reset)【转载】

一.CSS reset(CSS重置)的历史 根据淘宝射雕的叙述,最早的一份CSS reset来自Tantek 的undohtml.css,很简单的代码,Tantek 根据自己的需要,对浏览器的默认样式进 行了一些重置.其余一些有名的CSS reset如业界领袖Eric Meyer的reset,或是Tripoli Reset. CSS reset的作用是让各个浏览器的CSS样式有一个统一的基准,而这个基准更多的就是“清零”!如下面常见但事实上极不推荐的代码: *{ margin:0; paddin

reset css

reset css,即CSS重置,就是由于各种浏览器解释CSS样式的初始值有所不同,导致工程师在没有定义某个CSS属性时,不同的浏览器会按照自己的默认值来为没有定义的样式赋值,所以我们要先定义好一些CSS样式,来让所有浏览器都按照同样的规则解释CSS,这样就能避免发生这种问题. 网上reset css的代码很多,我也根据自己平时的项目需求整理了一份reset.css的代码.如果朋友们要用reset.css的话,也根据自己页面用到的标签,去设置相应的css reset代码. body,h1,h2,

less和reset.css的引用及首页活动、商品推荐模块的建立及flex布局

?记在前面 人生最大的希望在于:自己值得自己等待 先打开运行项目: 一.less和reset.css的使用 1.less的引用: 安装less和less-loader(之前补充过了)传送地址:https://www.cnblogs.com/crystral/p/9117161.html 2.reset.css的引用 ①去这个网站(https://cssreset.com/)下载一个reset.css文件,然后copy到src目录下: (这个我没有下载下来,点击没反应,所以去老师那里copy了一份

2.reset.css文件

重置CSS样式: 1 /* http://meyerweb.com/eric/tools/css/reset/ 2 v2.0 | 20110126 3 License: none (public domain) 4 */ 5 6 html, 7 body, 8 div, 9 span, 10 applet, 11 object, 12 iframe, 13 h1, 14 h2, 15 h3, 16 h4, 17 h5, 18 h6, 19 p, 20 blockquote, 21 pre, 22

【转载】各浏览器CSS兼容问题

CSS对浏览器的兼容性有时让人很头疼,或许当你了解当中的技巧跟原理,就会觉得也不是难事,从网上收集了IE7,6与Fireofx的兼容性处理方法并 整理了一下.对于web2.0的过度,请尽量用xhtml格式写代码,而且DOCTYPE 影响 CSS 处理,作为W3C的标准,一定要加 DOCTYPE声名. CSS技巧 1.div的垂直居中问题 vertical-align:middle; 将行距增加到和整个DIV一样高 line-height:200px; 然后插入文字,就垂直居中了.缺点是要控制内容

CSS reset.css

@charset "utf-8"; /* CSS Document */ /* KISSY CSS Reset */ /* 清除内外边距 */ body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ pre, /* text formatting elements 文本格式元素 */ f