<feBlend>

**<feBlend>** SVG 濾鏡基本元件將兩個物件組合在一起,並由特定的混合模式控制。這類似於影像編輯軟體在混合兩個圖層時所知的操作。模式由mode 屬性定義。

使用場景

類別濾鏡基本元件
允許內容以下任何元素,按任何順序
<animate>, <set>

屬性

DOM 介面

此元素實現 SVGFEBlendElement 介面。

示例

SVG

html
<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
    href="mdn_logo_only_color.png"
    x="10%"
    y="10%"
    width="80%"
    height="80%"
    style="filter:url(#spotlight);" />
</svg>

結果

規範

規範
濾鏡效果模組級別 1
# feBlendElement

瀏覽器相容性

BCD 表格僅在瀏覽器中載入

另請參閱