:right
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
:right
は CSS の擬似クラスで、@page
アットルールで使われ、印刷文書の右側のページすべてを表します。
css
/* 印刷時に右側のページを選択 */
@page :right {
margin: 2in 3in;
}
そのページが左側か右側かは、文書の主要な書字方向によって決まります。例えば、最初のページの主な書字方向が左から右であれば :right
ページになります。書字方向が右から左であれば :left
ページになります。
メモ:
この擬似クラスは、ページボックスの margin
, padding
, border
, background
の各プロパティのみを変更するために使用することができます。他のすべてのプロパティは無視され、ページ内の文書コンテンツではなく、ページボックスにのみ影響します。
構文
:right
例
右側のページにマージンを設定
css
@page :right {
margin: 2in 3in;
}
仕様書
Specification |
---|
CSS Paged Media Module Level 3 # left-right-first |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Right-hand page pseudo-class ( :right ) |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
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.