:left

打印文档时,:leftCSS 页 伪类与任何左页相匹配。它允许您描述左侧页面的样式。

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

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

注意:您不能更改所有CSS属性。您只能更改marginpaddingborder,和background页框的属性。所有其他CSS属性将被忽略,只有页面框,而不是页面上的文档内容,将受到影响。

语法

:left

实例

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

规范

SpecificationStatusComment
CSS Paged Media Module Level 3The definition of ':left' in that specification.Working DraftNo change.
CSS Level 2 (Revision 1)The definition of ':left' 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???