mode

mode 屬性定義了 <feBlend> 濾鏡基元上的混合模式。

您可以將此屬性與以下 SVG 元素一起使用

示例

html
<svg viewBox="0 0 480 200" xmlns="http://www.w3.org/2000/svg">
  <filter id="blending1" x="0" y="0" width="100%" height="100%">
    <feFlood
      result="floodFill"
      x="0"
      y="0"
      width="100%"
      height="100%"
      flood-color="seagreen"
      flood-opacity="1" />
    <feBlend in="SourceGraphic" in2="floodFill" mode="multiply" />
  </filter>
  <filter id="blending2" x="0" y="0" width="100%" height="100%">
    <feFlood
      result="floodFill"
      x="0"
      y="0"
      width="100%"
      height="100%"
      flood-color="seagreen"
      flood-opacity="1" />
    <feBlend in="SourceGraphic" in2="floodFill" mode="color-dodge" />
  </filter>

  <image
    href="mdn_logo_only_color.png"
    width="200"
    height="200"
    style="filter:url(#blending1);" />
  <image
    href="mdn_logo_only_color.png"
    width="200"
    height="200"
    style="filter:url(#blending2); transform:translateX(220px);" />
</svg>

使用注意事項

<混合模式>
預設值 normal
可動畫

有關值的描述,請參見 <混合模式>

規範

規範
濾鏡效果模組第 1 級
# element-attrdef-feblend-mode

瀏覽器相容性

BCD 表格僅在啟用 JavaScript 的瀏覽器中載入。