Browsers' default CSS stylesheets

北战南征 提交于 2019-11-26 01:49:42

问题


Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form)

I want to know the default font of text areas across all browsers for future reference.


回答1:


Not tabular, but the source CSS may be helpful if you're looking for something specific:

  • Firefox default HTML stylesheet
  • WebKit default HTML stylesheet

You're on your own with IE and Opera though.




回答2:


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.




回答3:


There probably is a list, this is why we use CSS Resets however.

  • Eric Meyer's Reset
  • Yahoo's Reset



回答4:


CSS class have compiled a list of CSS2.1 User Agent Style Sheet Defaults. Some links at the bottom of that page as well.




回答5:


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/




回答6:


There was some discussion and testing done on www-style not too long ago:

http://lists.w3.org/Archives/Public/www-style/2008Jul/0124.html

http://lists.w3.org/Archives/Public/www-style/2008Jul/att-0124/defaultstyles.htm



来源:https://stackoverflow.com/questions/32875/browsers-default-css-stylesheets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!