CSS分页规则

CSSPageRule  是代表一个css接口 @page 规则. 它实现了 CSSRule 类型值为6的接口 (CSSRule.PAGE_RULE).

语法

这个语法是使用 WebIDL 格式.

interface CSSPageRule : CSSRule {
  attribute DOMString selectorText;
  readonly attribute CSSStyleDeclaration style;
};

Properties

 CSSRule, CSSPageRule 也实现了此接口的属性。 它具有以下特定属性:

CSSPageRule.selectorText
表示与规则关联的页面选择器的文本。
CSSPageRule.style 只读
返回与规则关联的声明块。

Methods

作为 CSSRule, CSSPageRule 的CSSPageRule还实现了该接口的方法。 它没有具体方法。

Specifications

规格 状态 注释
CSS Object Model (CSSOM)
CSSPageRule
Working Draft

没有变化 Document Object Model (DOM) Level 2 Style Specification

Document Object Model (DOM) Level 2 Style Specification
CSSPageRule
Obsolete 初始定义

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CSSPageRuleChrome Full support 45Edge Full support YesFirefox Full support 19IE Full support YesOpera Full support 32Safari Full support YesWebView Android Full support 45Chrome Android Full support 45Firefox Android Full support 19Opera Android Full support 32Safari iOS Full support YesSamsung Internet Android Full support Yes
selectorTextChrome Full support YesEdge Full support 12Firefox No support NoIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android ? Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
styleChrome Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown