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

浏览器兼容性

BCD tables only load in the browser

相关链接