<filter>
Baseline 廣泛可用 *
<filter> SVG 元素透過組合原子濾鏡圖元來定義自定義濾鏡效果。它本身永遠不會被渲染,但必須透過 SVG 元素的 filter 屬性,或者 SVG/HTML 元素的 filter CSS 屬性來使用。
使用語境
屬性
DOM 介面
此元素實現了 SVGFilterElement 介面。
示例
SVG
html
<svg width="230" height="120" xmlns="http://www.w3.org/2000/svg">
<filter id="blurMe">
<feGaussianBlur stdDeviation="5" />
</filter>
<circle cx="60" cy="60" r="50" fill="green" />
<circle cx="170" cy="60" r="50" fill="green" filter="url(#blurMe)" />
</svg>
結果
規範
| 規範 |
|---|
| 濾鏡效果模組第 1 級 # FilterElement |
瀏覽器相容性
載入中…