CSSPageRule
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.
* Some parts of this feature may have varying levels of support.
CSSPageRule
は単一の CSS @page
ルールを表します。
インスタンスプロパティ
祖先である CSSRule
からプロパティを継承しています。
CSSPageRule.selectorText
-
このアットルールに関連付けられたページセレクターのテキストを表します。
CSSPageRule.style
読取専用-
このアットルールに関連付けられた宣言ブロックを返します。
インスタンスメソッド
祖先である CSSRule
からメソッドを継承しています。
例
このスタイルシートには単一の @page
ルールがあるので、最初の(そして唯一の)返されるルールは CSSPageRule
になります。
css
@page {
margin: 1cm;
}
js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0]); // CSSPageRule
仕様書
Specification |
---|
CSS Object Model (CSSOM) # the-csspagerule-interface |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CSSPageRule | ||||||||||||
selectorText | ||||||||||||
style | ||||||||||||
Type changed to CSSPageDescriptors |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.