blob: e1d98203485e7589ade0ec476ae3bca6a4f0fdb7 (
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
|
---
title: feBlend
slug: Web/SVG/Element/feBlend
tags:
- SVG
- SVG滤镜
- 元素
- 需要兼容性表
translation_of: Web/SVG/Element/feBlend
---
<div>{{SVGRef}}</div>
<p><code>feBlend</code>滤镜把两个对象组合在一起,使它们受特定的混合模式控制。这类似于图像编辑软件中混合两个图层。该模式由属性{{ SVGAttr("mode") }}定义。</p>
<h2 id="用法">用法</h2>
<p>{{svginfo}}</p>
<h2 id="示例">示例</h2>
<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>{{ SVGAttr("class") }}</li>
<li>{{ SVGAttr("style") }}</li>
</ul>
<h3 id="专有属性">专有属性</h3>
<ul>
<li>{{ SVGAttr("in") }}</li>
<li>{{ SVGAttr("in2") }}</li>
<li>{{ SVGAttr("mode") }}</li>
</ul>
<h2 id="DOM_接口">DOM 接口</h2>
<p>该元素实现了<code><a href="/en/DOM/SVGFEBlendElement" title="en/DOM/SVGFEBlendElement">SVGFEBlendElement</a></code>接口。</p>
<h2 id="示例_2">示例</h2>
<h3 id="SVG">SVG</h3>
<pre><code><svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<filter id="spotlight">
<feFlood result="floodFill" x="0" y="0" width="100%" height="100%"
flood-color="green" flood-opacity="1"/>
<feBlend in="SourceGraphic" in2="floodFill" mode="multiply"/>
</filter>
</defs>
<image xlink:href="/files/6457/mdn_logo_only_color.png"
x="10%" y="10%" width="80%" height="80%"
style="filter:url(#spotlight);"/>
</svg></code></pre>
<h3 id="Result">Result</h3>
<p>{{EmbedLiveSample("Example", 200, 200)}}</p>
<h2 id="参见">参见</h2>
<ul>
<li>{{ SVGElement("filter") }}</li>
<li>{{ SVGElement("animate") }}</li>
<li>{{ SVGElement("set") }}</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("feImage") }}</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 tutorial: Filter effects</a></li>
</ul>
|