是否有标准的 CSS 边距/填充等?对于 HTML 元素?
我相信 WordPress 会做类似的事情,他们使用 CSS 重置样式表,然后手动应用每个 HTML 元素的全局边距(以提高浏览器兼容性)。我正在寻找类似的东西,但没有 WordPress 特定元素。
同样,是否有一个我可以访问的 WebKit 使用的默认样式表?
I believe WordPress does something like this, they use a CSS reset stylesheet, then manually apply a global margin for each HTML element (to increase browser compatibility). I'm looking for something like this, but without the WordPress specific elements.
On a similar note, is there a default stylesheet that WebKit uses that I can access?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能需要考虑使用normalize.css而不是reset.css;检查他们的演示似乎表明这包括表单元素的标准:
http://necolas.github.com/normalize .css/
You may want to consider using normalize.css as opposed to a reset.css; checking their demo seems to indicate this includes standards for form elements:
http://necolas.github.com/normalize.css/
快速谷歌搜索发现了这个: http://meyerweb.com/eric/tools/css/重置/ 和这个:http://html5doctor.com/html-5-reset-stylesheet/等等
a quick google search turned up this: http://meyerweb.com/eric/tools/css/reset/ and this: http://html5doctor.com/html-5-reset-stylesheet/ among others
我通常使用 YUI Reset CSS 来实现此目的。 YUI Base CSS 可以通过为通用 HTML 元素应用在 A 中保持一致的样式基础来补充 Reset级浏览器。 YUI 来自 Yahoo,因此享有良好的支持,并且可能比其他类似的 CSS 框架更可靠。
I generally use YUI Reset CSS for this. YUI Base CSS can complement Reset by applying a style foundation for common HTML elements that is consistent across A-grade browsers. YUI is from Yahoo and hence enjoys good support and is presumably more reliable than other similar CSS frameworks.
默认 Chrome WebKit http: //codesearch.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/css/html.css
这是对接加载更多默认用户代理样式表
http://meiert.com/en/blog/20070922/user-代理样式表/
default Chrome WebKit http://codesearch.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/css/html.css
here's a butt load more default user agent style sheets
http://meiert.com/en/blog/20070922/user-agent-style-sheets/
据我所知,没有标准的 CSS
margin
等...这就是需要重置样式表的原因之一。没有人设置相同的样式,并且大多数浏览器都有不同的默认值。
对我来说,一旦我在大多数元素上重置了
margin
和padding
,我通常会将margin
设置为1em
左右 <代码>p、h1-h5
等There's no standard CSS
margin
etc. that I know of...That's one of the reasons why a reset stylesheet is necessary. No one sets the same styles and most browsers have different defaults.
For me, once I reset
margin
andpadding
on most elements, I usually make themargin
around1em
forp
,h1-h5
, etc.