blob: 0a480d564bc7a63bbc4839af7c1fe17f5d473633 (
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
---
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>
<div>{{CompatibilityTable}}</div>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support</td>
<td>15.0</td>
<td>{{CompatGeckoDesktop("15.0")}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Phone</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile("15.0")}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<p><code>早期候选推荐版本中有space,不过没有浏览器实现它,因而移除,将来可能添加进来。</code></p>
|