aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/border-image-source
diff options
context:
space:
mode:
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>