aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/border-image-source
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/border-image-source
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-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-source')
-rw-r--r--files/zh-cn/web/css/border-image-source/index.html79
1 files changed, 79 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/border-image-source/index.html b/files/zh-cn/web/css/border-image-source/index.html
new file mode 100644
index 0000000000..0680fffca1
--- /dev/null
+++ b/files/zh-cn/web/css/border-image-source/index.html
@@ -0,0 +1,79 @@
+---
+title: border-image-source
+slug: Web/CSS/border-image-source
+translation_of: Web/CSS/border-image-source
+---
+<div>{{CSSRef}}</div>
+
+<h2 id="Summary">Summary</h2>
+
+<p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a> 属性 <strong><code>border-image-source</code></strong>  用于声明元素的<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-image">边框图片(border-image)</a>的资源 </p>
+
+<p>{{EmbedInteractiveExample("pages/css/border-image-source.html")}}</p>
+
+<p>属性 {{cssxref("border-image-slice")}} 被用于切割资源图片的区域,然后将其动态的应用到最终的边框图片</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="brush:css">/* no border-image, use the specified border-style */
+border-image-source: none;
+
+/* the image.jpg is used as image */
+border-image-source: url(image.jpg);
+
+/* a gradient is used as image */
+border-image-source: linear-gradient(to top, red, yellow);
+
+/* Global values */
+border-image-source: inherit;
+border-image-source: initial;
+border-image-source: unset;
+</pre>
+
+<h3 id="Values">Values</h3>
+
+<dl>
+ <dt><code>none</code></dt>
+ <dd>不会使用图片边框。会被{{cssxref("border-style")}}属性所设置的边框样式替换掉</dd>
+ <dt><code>&lt;image&gt;</code></dt>
+ <dd>用作边框的图片</dd>
+</dl>
+
+<h3 id="Formal_syntax">Formal syntax</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<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-source', 'border-image-source')}}</td>
+ <td>{{Spec2('CSS3 Backgrounds')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{Compat("css.properties.border-image-source")}}</div>
+
+<div id="compat-mobile"></div>