aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/mask-border-repeat/index.html
blob: 4a67d406483d22f2f4404432c26ea8f5080a2a79 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
title: mask-border-repeat
slug: Web/CSS/mask-border-repeat
translation_of: Web/CSS/mask-border-repeat
---
<div>{{CSSRef}}{{SeeCompatTable}}</div>

<p><strong><code>mask-border-repeat</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> 属性设置如何调整源图像的边缘区域以适应元素遮罩边框的尺寸。</p>

<h2 id="语法">语法</h2>

<pre class="brush: css no-line-numbers">/* Keyword value */
mask-border-repeat: stretch;
mask-border-repeat: repeat;
mask-border-repeat: round;
mask-border-repeat: space;

/* vertical | horizontal */
mask-border-repeat: round stretch;

/* Global values */
mask-border-repeat: inherit;
mask-border-repeat: initial;
mask-border-repeat: unset;
</pre>

<p>可以从下面的列表中选择一个或两个值来指定 <code>mask-border-repeat</code> 属性。</p>

<ul>
 <li>指定一个值时,它会在<strong>四个边</strong>应用相同的行为。</li>
 <li>指定<strong>两个</strong>值时,第一个应用于<strong>顶部和底部</strong>,第二个应用于<strong>左侧和右侧</strong></li>
</ul>

<h3 id="Values">Values</h3>

<dl>
 <dt><code>stretch</code></dt>
 <dd>拉伸源图像的边缘区域以填充每个边界之间的间隙。</dd>
 <dt><code>repeat</code></dt>
 <dd>源图像的边缘区域被平铺(重复)以填充每个边界之间的间隙,可以裁剪平铺图形以达到合适的贴合效果。</dd>
 <dt><code>round</code></dt>
 <dd>源图像的边缘区域被平铺(重复)以填充每个边界之间的间隙,可以拉伸平铺图形以实现适当的贴合。</dd>
 <dt><code>space</code></dt>
 <dd>源图像的边缘区域被平铺(重复)以填充每个边框之间的间隙。平铺图形之间将分配额外的空间,以实现适当的贴合。</dd>
</dl>

<h3 id="正式语法">正式语法</h3>

<pre class="syntaxbox">{{csssyntax}}</pre>

<h2 id="Specifications" name="Specifications">规范</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">规格</th>
   <th scope="col">状态</th>
   <th scope="col">解释</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS Masks", "#propdef-mask-border-repeat", "mask-border-repeat")}}</td>
   <td>{{Spec2("CSS Masks")}}</td>
   <td>初始偏差</td>
  </tr>
 </tbody>
</table>

<div>{{cssinfo}}</div>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

<p>TBD</p>