:right

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

:rightCSS擬似クラスで、@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 GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
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

関連情報