此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

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 ⁨2020年1月⁩.

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

浏览器兼容性

参见