<feBlend>
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
La primitive de filtre SVG <feBlend>
permet de combiner deux objets en utilisant un mode de fusion définit, un peu de la même manière que les logiciels de retouche d'image permettent de fusionner deux calques. Le mode à utiliser est définit par l'attribut mode
.
Contexte d'utilisation
Attributs
Attributs globaux
Attributs spécifiques
Interface DOM
Cet élément implémente l'interface SVGFEBlendElement
.
Exemple
SVG
<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>
Résultat
Spécifications
Specification |
---|
Filter Effects Module Level 1 # feBlendElement |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
feBlend | ||||||||||||
in | ||||||||||||
in2 | ||||||||||||
mode |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support