blob: ba309b028f85e4f0ae20de6272492bfff4ffdd05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
---
title: part
slug: Web/HTML/Global_attributes/part
translation_of: Web/HTML/Global_attributes/part
---
<div>{{HTMLSidebar("Global_attributes")}}</div>
<p><strong>part</strong> <a href="/en-US/docs/Web/HTML/Global_attributes">全局属性</a> 包含一个以元素中part属性名称组成的列表,该列表以空格分隔。通过Part 的名称,可以使用CSS伪元素“::part”来选择shadow 树中指定元素并设置其样式 。</p>
<p>参见用例 <a href="https://mdn.github.io/web-components-examples/shadow-part/">Shadow part 实例</a>.</p>
<h2 id="标准">标准</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName("CSS Shadow Parts", "#part-attr", "part")}}</td>
<td>{{Spec2('CSS Shadow Parts')}}</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("html.global_attributes.part")}}</p>
<h2 id="相关链接">相关链接</h2>
<ul>
<li>所有 <a href="/en-US/docs/Web/HTML/Global_attributes">全局属性</a>。</li>
</ul>
|