浏览器的默认 CSS 样式表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32875/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Browsers' default CSS stylesheets
提问by AnnanFay
Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form)
是否有适用于不同浏览器的默认 CSS 样式表列表?(表格形式的浏览器样式表)
I want to know the default font of text areas across all browsers for future reference.
我想知道所有浏览器中文本区域的默认字体以供将来参考。
采纳答案by robertc
Not tabular, but the source CSS may be helpful if you're looking for something specific:
不是表格,但如果您正在寻找特定的东西,源 CSS 可能会有所帮助:
You're on your own with IE and Opera though.
不过,您只能自己使用 IE 和 Opera。
回答by Greg Hurlman
I suspect this is something of a moving target for all the browsers, but there is a default style sheet for HTML 4 as defined by the W3C.
我怀疑这对于所有浏览器来说都是一个移动目标,但是 W3C 定义了 HTML 4 的默认样式表。
回答by Ross
There probably is a list, this is why we use CSS Resets however.
可能有一个列表,这就是我们使用 CSS 重置的原因。
回答by Daniel James
CSS class have compiled a list of CSS2.1 User Agent Style Sheet Defaults. Some links at the bottom of that page as well.
CSS 类已经编译了一个CSS2.1 用户代理样式表默认值列表。该页面底部的一些链接也是如此。
回答by Will Dean
You cannot possibly know all defaults for all configurations of all browsers into the future.
您不可能知道未来所有浏览器的所有配置的所有默认值。
The way people get around this is to start their CSS by resetting everything to known values. Here's an example from one of the main CSS experts: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
人们解决这个问题的方法是通过将所有内容重置为已知值来启动他们的 CSS。这是一位主要 CSS 专家的示例:http: //meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
回答by Shadow2531
There was some discussion and testing done on www-style not too long ago:
不久前对 www-style 进行了一些讨论和测试:
http://lists.w3.org/Archives/Public/www-style/2008Jul/0124.html
http://lists.w3.org/Archives/Public/www-style/2008Jul/0124.html
http://lists.w3.org/Archives/Public/www-style/2008Jul/att-0124/defaultstyles.htm
http://lists.w3.org/Archives/Public/www-style/2008Jul/att-0124/defaultstyles.htm