CSSStyleRule

翻译不完整。 请帮助我们翻译这篇文章!

CSSStyleRule 表示一条 CSS 样式规则。它实现了 CSSRule 接口,类型的值为 1CSSRule.STYLE_RULE)。

属性

CSSStyleRule.selectorText
返回这条规则的、文本格式的选择器,例如 "h1,h2"
CSSStyleRule.style 只读
返回这条规则的 CSSStyleDeclaration 对象。
CSSStyleRule.styleMap 只读
返回一个 StylePropertyMap 对象,which provides access to the rule's property-value pairs.

规范

规范 状态 备注
CSS Object Model (CSSOM)
CSSStyleRule
Working Draft No changes
Document Object Model (DOM) Level 2 Style Specification
CSSRule
Obsolete

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CSSStyleRuleChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support 4.4Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
selectorTextChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 4.4Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
styleChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 4.4Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
styleMapChrome Full support 65Edge Full support ≤79Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support 65Chrome Android Full support 65Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support 9.0

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown