mozilla
Your Search Results

    CSSRuleList

    この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

    Summary

    A CSSRuleList is an array-like object containing an ordered collection of CSSRule objects.

    Description

    Each CSSRule can be accessed as rules.item(index), or simply rules[index], where rules is an object implementing the CSSRuleList interface, and index is the 0-based index of the rule, in the order as it appears in the style sheet CSS. The number of objects is rules.length.

    Example

    // get the first style sheet’s first rule
    var first_rule = document.styleSheets[0].cssRules[0];
    

    See also

    CSSRuleList implementations

    There are multiple properties in the CSSOM that will return a CSSRuleList. They are:

    Specification

    ドキュメントのタグと貢献者

    最終更新者: fscholz,