part
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
part 全局属性 包含一个以元素中 part 属性名称组成的列表,该列表以空格分隔。通过 Part 的名称,可以使用 CSS 伪元素“::part”来选择 shadow 树中指定元素并设置其样式。
参见用例 Shadow part 实例.
规范
Specification |
---|
CSS Shadow Parts # part-attr |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
part |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.
相关链接
- 所有 全局属性。