part

翻译不完整。 请帮助我们翻译这篇文章!

part 全局属性 包含一个以元素中part属性名称组成的列表,该列表以空格分隔。通过Part 的名称,可以使用CSS伪元素“::part”来选择shadow 树中指定元素并设置其样式 。

参见用例 Shadow part 实例.

标准

Specification Status Comment
Shadow Parts
part
Working Draft

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
part
Experimental
Chrome Full support 73Edge Full support 79Firefox Full support 72
Full support 72
No support 69 — 72
Disabled
Disabled From version 69 until version 72 (exclusive): this feature is behind the layout.css.shadow-parts.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 60Safari Full support 13.1WebView Android Full support 73Chrome Android Full support 73Firefox Android No support NoOpera Android ? Safari iOS Full support 13.4Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

相关链接