Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Эта статья нуждается в редакционном обзоре. Как вы можете помочь.

Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!

The Document.styleSheets read-only property returns a StyleSheetList of CSSStyleSheet objects for stylesheets explicitly linked into or embedded in a document.

Syntax

var styleSheetList = document.styleSheets;

The returned object is a StyleSheetList.

It is an ordered collection of CSSStyleSheet objects. styleSheetList.item(index) or simply styleSheetList[index] returns a single stylesheet object by its index (index is 0-based).

The list is ordered as follows:

  • StyleSheets retrieved from Link headers are placed first, sorted in header order.
  • StyleSheets retrieved from the DOM are placed after, sorted in tree order.

Specifications

Specification Status Comment
CSS Object Model (CSSOM)
The definition of 'styleSheets' in that specification.
Working Draft  
Document Object Model (DOM) Level 2 Style Specification
The definition of 'styleSheets' in that specification.
Recommendation Initial definition

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? (Yes) ? ? ?

See also

Метки документа и участники

 Внесли вклад в эту страницу: Ephys, Sebastianz, teoli, Dattaya, kscarfone, Prachi_Dighe, ethertank, Sheppy, MMM, kitchin, Matej Lednar, George3, Mgjbot, Nickolay, Dleonard, Ptak82, Dria, JesseW
 Обновлялась последний раз: Ephys,