How can I locate the default style sheet for a bro

2019-01-06 15:49发布

I would like to see the specific style elements that are used in the default stylesheet for the various browsers. Do the browsers have an actual file based stylesheetss that I locate on my system and read? If so, what are the default locations of those files? If not, where I can find this information?

10条回答
Animai°情兽
2楼-- · 2019-01-06 15:52

The default stylesheet is generally not available. I recommend starting your own stylesheet with a "reset styles" part, or including reset styles in a style sheet you load first. Eg.

<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/reset.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/general.css"></link>

Eric Meyer ("the" Eric, just google Eric) offers a battle tested and widely used reset style sheet here: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

查看更多
倾城 Initia
3楼-- · 2019-01-06 15:54

In Opera, on OSX the file is located at /Applications/Opera.app/Contents/Resources/Styles/user.css

查看更多
小情绪 Triste *
4楼-- · 2019-01-06 15:55

This may be tangential to the heart of your question, but if I'm right in guessing why you want this information, you may want to check out browsershots.org.

Browsershots makes screenshots of your Web design in different browsers.

In other words, you can see what your website looks like in many different browsers, browser versions, and platforms.

查看更多
SAY GOODBYE
5楼-- · 2019-01-06 15:59

On Firefox, look for res/html.css, and the other CSS files in the same directory.

Or just open resource://gre-resources/forms.css in Firefox.

查看更多
萌系小妹纸
7楼-- · 2019-01-06 16:07

Inspect html elements in the browser and find the css rules at the bottom right. You will find user agent styles or browser's styles (in Firefox named as html.css). copy the file location and open it in the tab - there you go.

Location default stylesheets

Firefox - resource://gre-resources/html.css
Chrome - https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css

you can find for others.

查看更多
登录 后发表回答