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 格式。

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

特性

由于 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.

方法

由于 CSSRule , CSSPageRule also implements the methods of that interface. It has no specific methods.

规范

规范 状态 注释
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.
过时 初始定义

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
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

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

元数据

  • 最后修改: