이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

CSSStyleRule represents a single CSS style rule. It implements the CSSRule interface with a type value of 1 (CSSRule.STYLE_RULE).

Properties

CSSStyleRule.selectorText
Returns the textual representation of the selector for this rule, e.g. "h1,h2".
CSSStyleRule.style Read only
Returns the CSSStyleDeclaration object for the rule.
CSSStyleRule.styleMap Read only
Returns a StylePropertyMap object which provides access to the rule's property-value pairs.

Specifications

Specification Status Comment
CSS Object Model (CSSOM)
The definition of 'CSSStyleRule' in that specification.
Working Draft No changes
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSRule' in that specification.
Obsolete

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CSSStyleRuleChrome Full support 1Edge Full support YesFirefox 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 ?
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 ?
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 ?
styleMapChrome Full support 65Edge ? Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support 65Chrome Android Full support 65Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

문서 태그 및 공헌자

최종 변경자: JonathanPool,