SVG参考手册
分类 | Elements
femerge
<feMerge>
SVG元素允许施加的同时而不是按顺序的过滤效果。这是通过其他过滤器通过result
属性存储它们的输出,然后在<feMergeNode>
子元素中访问它来实现的。
用法上下文
分类 |
过滤基元 |
---|---|
允许的内容 |
任意数量的以下元素,以任意顺序:<feMergeNode> |
例
SVG
<svg width="200" height="200"
xmlns="http://www.w3.org/2000/svg">
<filter id="feOffset" x="-40" y="-20" width="100" height="200">
<feOffset in="SourceGraphic" dx="60" dy="60" />
<feGaussianBlur in="SourceGraphic" stdDeviation="5" />
<feMerge>
<feMergeNode in="blur2" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
<rect x="40" y="40" width="100" height="100"
style="stroke: #000000; fill: green; filter: url(#feOffset);" />
<rect x="40" y="40" width="100" height="100"
style="stroke : #000000; fill: green;" />
</svg>
结果
属性
全局属性
- Core attributes
- Presentation attributes
- Filter primitive attributes
class
style
具体属性
None
DOM接口
这个元素实现了SVGFEMergeElement
接口。
产品规格
Specification |
Status |
Comment |
---|---|---|
Filter Effects Module Level 1The definition of '<feMerge>' in that specification. |
Working Draft |
No change |
Scalable Vector Graphics (SVG) 1.1 (Second Edition)The definition of '<feMerge>' in that specification. |
Recommendation |
Initial definition |
浏览器兼容性
Feature |
Chrome |
Edge |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|---|
Basic support |
(Yes) |
(Yes) |
4.0 (2.0) |
(Yes) |
9.0 |
? |
Feature |
Android |
Edge |
Firefox Mobile (Gecko) |
IE Phone |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|---|
Basic support |
? |
(Yes) |
? |
? |
? |
? |