part
part 全局属性 包含元素的部分名称的空格分隔列表。部分名称允许 CSS 通过 ::part 伪元素选择影子树中的特定元素并设置其样式。
¥The part global attribute contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element.
有关使用示例,请参阅 exportparts 属性。
¥See the exportparts attribute for a usage example.
规范
| Specification |
|---|
| CSS Shadow Parts # part-attr |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also
exportpartsHTML 属性<template>和<slot>HTML 元素::part和::slottedCSS 伪元素ShadowRoot接口Element.part属性- 使用模板和插槽
- CSS 范围 模块