接口的使用
org.w3c.dom.css.CSSRule

使用 CSSRule 的包
描述
为 DOM Level 2 Style Specification 提供接口。
  • CSSRuleorg.w3c.dom.css 中的用法

    org.w3c.dom.cssCSSRule 的子接口
    修饰符和类型
    接口
    描述
    interface 
    CSSCharsetRule 接口表示 CSS 样式表中的 @charset 规则。
    interface 
    CSSFontFaceRule 接口表示 CSS 样式表中的 @font-face 规则。
    interface 
    CSSImportRule 接口表示 CSS 样式表中的 @import 规则。
    interface 
    CSSMediaRule 接口表示 CSS 样式表中的 @media 规则。
    interface 
    CSSPageRule 接口表示 CSS 样式表中的@page 规则。
    interface 
    CSSStyleRule 接口表示 CSS 样式表中的单个规则集。
    interface 
    CSSUnknownRule 接口表示此用户代理不支持的规则。
    org.w3c.dom.css 中返回 CSSRule 的方法
    修饰符和类型
    方法
    描述
    CSSStyleSheet.getOwnerRule()
    如果此样式表来自 @import 规则,则 ownerRule 属性将包含 CSSImportRule
    CSSRule.getParentRule()
    如果此规则包含在另一个规则中(例如@media 块中的样式规则),则这是包含规则。
    CSSStyleDeclaration.getParentRule()
    包含此声明块或 null 的 CSS 规则,如果此 CSSStyleDeclaration 未附加到 CSSRule
    CSSRuleList.item(int index)
    用于通过序号索引检索 CSS 规则。