blob: dc1cce54ff43b6770a14326b00a12334a1d0a8e1 (
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
|
---
title: feImage
slug: Web/SVG/Element/feImage
tags:
- SVG
- SVG滤镜
- 元素
- 需要兼容性表
- 需要示例
translation_of: Web/SVG/Element/feImage
---
<div>{{SVGRef}}</div>
<p><code>feImage滤镜从外部来源取得图像数据,并提供像素数据作为输出(意味着如果外部来源是一个SVG图像,这个图像将被栅格化。)</code></p>
<h2 id="用法">用法</h2>
<p>{{svginfo}}</p>
<h2 id="属性">属性</h2>
<h3 id="全局属性">全局属性</h3>
<ul>
<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#Filter" title="en/SVG/Attribute#Filter">滤镜属性</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>
</ul>
<h3 id="专有属性">专有属性</h3>
<ul>
<li>{{ SVGAttr("preserveAspectRatio") }}</li>
<li>{{ SVGAttr("xlink:href") }}</li>
</ul>
<h2 id="DOM_接口">DOM 接口</h2>
<p>该元素实现了{{domxref("SVGFEImageElement")}}接口。</p>
<h2 id="示例">示例</h2>
<h3 id="SVG">SVG</h3>
<pre class="brush: html"><svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<filter id="image">
<feImage xlink:href="/files/6457/mdn_logo_only_color.png"/>
</filter>
</defs>
<rect x="10%" y="10%" width="80%" height="80%"
style="filter:url(#image);"/>
</svg></pre>
<h3 id="结果">结果</h3>
<p>{{EmbedLiveSample("Example", 200, 200)}}</p>
<h2 id="规格">规格</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">规范</th>
<th scope="col">状态</th>
<th scope="col">注释</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName("Filters 1.0", "#feImageElement", "<feImage>")}}</td>
<td>{{Spec2("Filters 1.0")}}</td>
<td>添加了 {{SVGAttr("href")}} 属性并弃用{{SVGAttr("xlink:href")}}。 添加了 {{SVGAttr("crossorigin")}} 属性。</td>
</tr>
<tr>
<td>{{SpecName("SVG1.1", "filters.html#feImageElement", "<feImage>")}}</td>
<td>{{Spec2("SVG1.1")}}</td>
<td>初始定义</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
{{Compat("svg.elements.feImage")}}
<h2 id="参见">参见</h2>
<ul>
<li>{{ SVGElement("filter") }}</li>
<li>{{ SVGElement("animate") }}</li>
<li>{{ SVGElement("animateTransform") }}</li>
<li>{{ SVGElement("set") }}</li>
<li>{{ SVGElement("feBlend") }}</li>
<li>{{ SVGElement("feColorMatrix") }}</li>
<li>{{ SVGElement("feComponentTransfer") }}</li>
<li>{{ SVGElement("feComposite") }}</li>
<li>{{ SVGElement("feConvolveMatrix") }}</li>
<li>{{ SVGElement("feDiffuseLighting") }}</li>
<li>{{ SVGElement("feDisplacementMap") }}</li>
<li>{{ SVGElement("feFlood") }}</li>
<li>{{ SVGElement("feGaussianBlur") }}</li>
<li>{{ SVGElement("feMerge") }}</li>
<li>{{ SVGElement("feMorphology") }}</li>
<li>{{ SVGElement("feOffset") }}</li>
<li>{{ SVGElement("feSpecularLighting") }}</li>
<li>{{ SVGElement("feTile") }}</li>
<li>{{ SVGElement("feTurbulence") }}</li>
<li><a href="/en/SVG/Tutorial/Filter_effects" title="en/SVG/Tutorial/Filter_effects">SVG教程:滤镜效果</a></li>
</ul>
|