StyleSheet

An object implementing the StyleSheet interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet 接口。

特性

StyleSheet.disabled
Boolean representing whether the current stylesheet has been applied or not.
StyleSheet.href 只读
返回 DOMString representing the location of the stylesheet.
StyleSheet.media 只读
返回 MediaList representing the intended destination medium for style information.
StyleSheet.ownerNode 只读
返回 Node associating this style sheet with the current document.
StyleSheet.parentStyleSheet 只读
返回 StyleSheet including this one, if any; returns null if there aren't any.
StyleSheet.title 只读
返回 DOMString representing the advisory title of the current style sheet.
StyleSheet.type 只读
返回 DOMString representing the style sheet language for this style sheet.

规范

规范 状态 Comment
CSS Object Model (CSSOM)
The definition of 'StyleSheet' in that specification.
工作草案 No change from Document Object Model (DOM) Level 2 Style Specification .
Document Object Model (DOM) Level 2 Style Specification
The definition of 'StyleSheet' in that specification.
Obsolete 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
StyleSheet Chrome 1 Edge ≤18 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
disabled Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
href Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
media Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
ownerNode Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
parentStyleSheet Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
title Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
type Chrome 1 Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes

图例

完整支持
完整支持
兼容性未知
兼容性未知

另请参阅