Document.styleSheets

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.

La propriété Document.styleSheets est en lecture seule et retourne une liste StyleSheetList d'objets CSSStyleSheet, qui font référence à l'ensemble des feuilles de style contenues ou embarquées dans le document.

Syntaxe

js
var styleSheetList = document.styleSheets;

L'objet retourné est une liste StyleSheetList.

Il s'agit d'une collection ordonnée d'objets CSSStyleSheet. styleSheetList.item(index) ou styleSheetList[index] retourne un seul objet stylesheet par son index (index débute par 0).

Spécifications

Specification
CSS Object Model (CSSOM)
# dom-documentorshadowroot-stylesheets

Compatibilité des navigateurs

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
styleSheets

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support