|
孤陋寡闻,居然不知道CSS还可以这么写系统颜色,找了篇文章学习一下。
直接调用系统的颜色显示在网页上本来是件很好玩滴事,但是,也有个缺点,就是可用的色太少 比如Bindows在它的启动画面一点点应用。
=。= 上次本来想在某个产品上应用,结果给人BS了,原因是色不好看 囧rz
在css21 中 System Colors也有相关描述,CSS3还加了超链接的色,还有个flavor。
但是,要有浏览器支持才是硬道理,浏览器不支持,虾米都回家睡觉。
附各色显示效果,如果看不到文字部分就像刮彩票一半刮开看一下,其中,Background 这个在safari 比较神奇,是透明哦。
CSS2.1中的System Colors
ActiveBorderActive window border.ActiveCaptionActive window caption.AppWorkspaceBackground color of multiple document interface.BackgroundDesktop background. » test color:Background @aoaoButtonFaceFace color for three-dimensional display elements.ButtonHighlightHighlight color for three-dimensional display elements (for edges facing away from the light source).ButtonShadowShadow color for three-dimensional display elements.ButtonTextText on push buttons.CaptionTextText in caption, size box, and scrollbar arrow box.GrayTextGrayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.HighlightItem(s) selected in a control.HighlightTextText of item(s) selected in a control.InactiveBorderInactive window border.InactiveCaptionInactive window caption.InactiveCaptionTextColor of text in an inactive caption.InfoBackgroundBackground color for tooltip controls.InfoTextText color for tooltip controls.MenuMenu background.MenuTextText in menus.ScrollbarScroll bar gray area.ThreeDDarkShadowDark shadow for three-dimensional display elements.ThreeDFaceFace color for three-dimensional display elements.ThreeDHighlightHighlight color for three-dimensional display elements.ThreeDLightShadowLight color for three-dimensional display elements (for edges facing the light source).ThreeDShadowDark shadow for three-dimensional display elements.WindowWindow background.WindowFrameWindow frame.WindowTextText in windows.
CSS3 新加的 User preferences for hyperlink colors
ActiveHyperlinkActive hyperlink background.ActiveHyperlinkTextText of an active hyperlink.HoverHyperlinkHover hyperlink background.HoverHyperlinkTextText of a hyperlink in the hover state.HyperlinkHyperlink background.HyperlinkTextHyperlink text.VisitedHyperlinkVisited hyperlink background.VisitedHyperlinkTextText of a visited hyperlink. flavorAn accent color (typically chosen by the user) tocustomize the user interface of the user agent itself. User agents maydefault the ‘flavor’ color to the dominant accent color used on thephysical machine/mechanism that the user is interacting with(frequently a mouse, keyboard, monitor and computer case, often just alaptop), if the UA is able to retrieve that information from theplatform and machine. It is not expected that this value will makesense on all platforms and machines.
原文地址:http://www.aoao.org.cn/blog/2009/01/css-system-colors
|
|