CSSRule:parentStyleSheet 屬性
CSSRule 介面的 parentStyleSheet 屬性返回定義當前規則的 StyleSheet 物件。
值
一個 StyleSheet 物件。
示例
js
const docRules = document.styleSheets[0].cssRules;
console.log(docRules[0].parentStyleSheet === document.styleSheets[0]); // returns true
規範
| 規範 |
|---|
| CSS 物件模型 (CSSOM) # dom-cssrule-parentstylesheet |
瀏覽器相容性
載入中…