blob: f26a3a22e6d02588cc3d013e5a94da7f21d63586 (
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
75
|
---
title: border-image-repeat
slug: Web/CSS/border-image-repeat
tags:
- CSS
- CSS Borders
- CSS Property
- Reference
translation_of: Web/CSS/border-image-repeat
---
<div>{{CSSRef}}</div>
<h2 id="Summary">Summary</h2>
<p><code>border-image-repeat </code>定义图片如何填充边框。或为单个值,设置所有的边框;或为两个值,分别设置水平与垂直的边框。</p>
<div>{{cssinfo}}</div>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("border-image-repeat")}} </pre>
<pre>border-image-repeat: <em>type</em> <em> /* One-value syntax */</em> E.g. border-image-value: stretch;
border-image-repeat: <em>horizontal</em> <em>vertical</em> <em>/* Two-value syntax */ </em>E.g. border-image-width: round space;
border-image-repeat: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
<dt><em>type</em></dt>
<dd><code>stretch</code>, <code>repeat</code>, <code>round</code>, <code>space</code> 选一。属于单个值的情况。</dd>
<dt><em>horizontal</em></dt>
<dd><code>stretch</code>, <code>repeat</code>, <code>round</code>, <code>space</code> 选一。属于两个值的情况。</dd>
<dt><em>vertical</em></dt>
<dd><code>stretch</code>, <code>repeat</code>, <code>round</code>, <code>space</code> 选一。属于两个值的情况。</dd>
<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>
<dt><code>inherit</code></dt>
<dd>继承父级元素的计算值。</dd>
</dl>
<h2 id="Specifications" name="Specifications">Examples</h2>
<p>不同的取值,查看 {{cssxref("border-image")}} 的示例。</p>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('CSS3 Backgrounds', '#border-image-repeat', 'border-image-repeat')}}</td>
<td>{{Spec2('CSS3 Backgrounds')}}</td>
<td>Initial specification</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
{{Compat("css.properties.border-image-repeat")}}
|