CSS :right Pseudo-class

Definition and Usage

CSS :right Pseudo-classes are used to select and set the styles of all right-hand pages in the printed document.

Tip::right Pseudo-classes and @page Rules Used Together.

Note:The following properties can be used with :right Used Together:

  • Margin Properties
  • Padding Properties
  • Border Properties
  • Background Properties

Example

Select all right-hand pages for printing:

@page :right {
  margin-left: 40%;
  margin-top: 50%;
}

Try It Yourself

CSS Syntax

@page :right {
  css declarations;
}

Technical Details

Version: CSS3

Browser Support

The numbers in the table specify the first browser version that fully supports this pseudo-class.

Chrome Edge Firefox Safari Opera
6 12 不支持 5 9.2

相关页面

Αναφορά:Πseudo-κλάση :first του CSS

Αναφορά:Πseudo-κλάση :left του CSS