:right

:rightCSS 页 伪类匹配任何右页。它允许您描述右侧页面的样式。

/* Selects the content on the right-hand pages while printing */ @page :right { margin: 2in 3in; }

页面左右是由文档的主要书写方向决定的。例如,如果第一页的主要书写方向是从左到右,那么它将是一个:right页面,如果它具有从右到左的主要书写方向,那么它将是一个:left页面。

注:您可以更改所有CSS属性。只能更改页框的页边距、填充、边框和背景属性。所有其他CSS属性都将被忽略,只有页面框而不是页面上的文档内容会受到影响。

语法

:right

实例

@page :right {   margin: 2in 3in; }

规范

SpecificationStatusComment
CSS Paged Media Module Level 3The definition of ':right' in that specification.Working DraftNo change.
CSS Level 2 (Revision 1)The definition of ':right' in that specification.RecommendationInitial definition.

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support?(Yes)No support8.09.2?

FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support?(Yes)No support???