aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/element/pattern
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/svg/element/pattern
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/svg/element/pattern')
-rw-r--r--files/zh-cn/web/svg/element/pattern/index.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/element/pattern/index.html b/files/zh-cn/web/svg/element/pattern/index.html
new file mode 100644
index 0000000000..cb82f58be7
--- /dev/null
+++ b/files/zh-cn/web/svg/element/pattern/index.html
@@ -0,0 +1,54 @@
+---
+title: pattern
+slug: Web/SVG/Element/pattern
+tags:
+ - SVG
+ - SVG容器
+ - 元素
+ - 需要兼容性表
+translation_of: Web/SVG/Element/pattern
+---
+<div>{{SVGRef}}</div>
+
+<p>使用预定义的图形对一个对象进行填充或描边,就要用到<code>pattern</code>元素。<code>pattern</code>元素让预定义图形能够以固定间隔在x轴和y轴上重复(或平铺)从而覆盖要涂色的区域。先使用<code>pattern元素定义图案,然后在给定的图形元素上用属性fill或属性stroke引用用来填充或描边的图案。</code></p>
+
+<h2 id="用法">用法</h2>
+
+<p>{{svginfo}}</p>
+
+<h2 id="示例">示例</h2>
+
+<p>» <a href="https://developer.mozilla.org/files/3268/pattern.svg" title="https://developer.mozilla.org/files/3268/pattern.svg">pattern.svg</a></p>
+
+<h2 id="属性">属性</h2>
+
+<h3 id="全局属性">全局属性</h3>
+
+<ul>
+ <li><a href="/en/SVG/Attribute#ConditionalProccessing" title="en/SVG/Attribute#ConditionalProccessing">条件处理属性</a> »</li>
+ <li><a href="/en/SVG/Attribute#Core" title="en/SVG/Attribute#Core">核心属性</a> »</li>
+ <li><a href="/en/SVG/Attribute#Presentation" title="en/SVG/Attribute#Presentation">外观属性</a> »</li>
+ <li><a href="/en/SVG/Attribute#XLink" title="en/SVG/Attribute#XLink">Xlink属性</a> »</li>
+ <li>{{ SVGAttr("class") }}</li>
+ <li>{{ SVGAttr("style") }}</li>
+ <li>{{ SVGAttr("externalResourcesRequired") }}</li>
+ <li>{{ SVGAttr("viewBox") }}</li>
+</ul>
+
+<h3 id="专有属性">专有属性</h3>
+
+<ul>
+ <li>{{ SVGAttr("patternUnits") }}</li>
+ <li>{{ SVGAttr("patternContentUnits") }}</li>
+ <li>{{ SVGAttr("patternTransform") }}</li>
+ <li>{{ SVGAttr("x") }}</li>
+ <li>{{ SVGAttr("y") }}</li>
+ <li>{{ SVGAttr("width") }}</li>
+ <li>{{ SVGAttr("height") }}</li>
+ <li>{{ SVGAttr("xlink:href") }}</li>
+ <li>{{ SVGAttr("preserveAspectRatio") }}</li>
+</ul>
+
+<h2 id="DOM_接口">DOM 接口</h2>
+
+<p>该元素实现了<code><a href="/en/DOM/SVGPatternElement" title="en/DOM/SVGPatternElement">SVGPatternElement</a></code>接口。</p>