diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/border-image-repeat | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/css/border-image-repeat')
-rw-r--r-- | files/zh-cn/web/css/border-image-repeat/index.html | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/border-image-repeat/index.html b/files/zh-cn/web/css/border-image-repeat/index.html new file mode 100644 index 0000000000..0a480d564b --- /dev/null +++ b/files/zh-cn/web/css/border-image-repeat/index.html @@ -0,0 +1,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> |