Is it possible to get information about browser's col开发者_StackOverflow社区ors? In order to code something that looks like a browser's toolbar.
Thanks!
You should use the standard CSS operating-specific colours. In your CSS file, for instance:
#toolbar {
background-color: ThreeDFace;
border-top: 1px solid ThreeDHighlight;
border-bottom: 1px solid ThreeDShadow;
}
You can view what these colours would be in this article: http://webdesign.about.com/od/colorcharts/l/blsystemcolors.htm
Sounds a little like you're trying to spoof information from the user by doing something like this :S
You can make assumptions obviously based on the operating system and browser combination (incl version), and then create a toolbar based on the default colour schemes that are used. Browsers such as Firefox now have personas or themes which even the css2 system color space described by BoltClock is not rich enough to describe so there is no guarantee that you'll get it right every time. The average user does not deviate from the default colour schemes so you can have a good go at it.
精彩评论