CSSPageRule

CSSPageRule is an interface representing a single CSS @page rule. It implements the CSSRule interface with a type value of 6 ( CSSRule.PAGE_RULE ).

句法

The syntax is described using the WebIDL format.

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

特性

As a CSSRule , CSSPageRule also implements the properties of this interface. It has the following specific properties:

CSSPageRule.selectorText
Represents the text of the page selector associated with the at-rule.
CSSPageRule.style 只读
Returns the declaration block associated with the at-rule.

方法

As a CSSRule , CSSPageRule also implements the methods of that interface. It has no specific methods.

规范

规范 状态 Comment
CSS Object Model (CSSOM)
The definition of 'CSSPageRule' in that specification.
工作草案 No changes from Document Object Model (DOM) Level 2 Style Specification
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSPageRule' in that specification.
Obsolete 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
CSSPageRule Chrome 45 Edge 12 Firefox 19 IE Yes Opera 32 Safari Yes WebView Android 45 Chrome Android 45 Firefox Android 19 Opera Android 32 Safari iOS Yes Samsung Internet Android 5.0
selectorText Chrome Yes Edge 12 Firefox No IE Yes Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android ? Opera Android Yes Safari iOS Yes Samsung Internet Android Yes
style Chrome Yes Edge 12 Firefox Yes IE ? Opera Yes Safari Yes WebView Android Yes Chrome Android Yes Firefox Android Yes Opera Android Yes Safari iOS Yes Samsung Internet Android Yes

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知