ProcessingInstruction:sheet 属性

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.

sheet 属性是 ProcessingInstruction 接口的一个只读属性,它包含了与该 ProcessingInstruction 相关联的样式表信息。

处理指令 xml-stylesheet 常用于在 XML 文件中关联样式表。

关联的 Stylesheet 对象,如果没有,则为 null

示例

xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="rule.css"?>

处理指令的 sheet 属性将返回描述 rule.cssStyleSheet 对象。

规范

Specification
CSS Object Model (CSSOM)
# dom-linkstyle-sheet

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
sheet

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见