<feImage>
<feImage> SVG 濾鏡基元從外部源獲取影像資料並提供畫素資料作為輸出(這意味著如果外部源是 SVG 影像,則會將其柵格化)。
使用上下文
| 類別 | 濾鏡基元元素 |
|---|---|
| 允許的內容 | 任意數量的以下元素,以任意順序<animate>、<animateTransform>、<set> |
屬性
DOM 介面
此元素實現 SVGFEImageElement 介面。
示例
SVG
html
<svg
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="200"
height="200">
<defs>
<filter id="image">
<feImage href="mdn_logo_only_color.png" />
</filter>
</defs>
<rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);" />
</svg>
結果
規範
| 規範 |
|---|
| 濾鏡效果模組級別 1 # feImageElement |
瀏覽器相容性
BCD 表格僅在瀏覽器中載入
另請參閱
- SVG 濾鏡基元屬性
flood-color屬性flood-opacity屬性<filter><animate><animateTransform><set><feBlend><feColorMatrix><feComponentTransfer><feComposite><feConvolveMatrix><feDiffuseLighting><feDisplacementMap><feFlood><feGaussianBlur><feMerge><feMorphology><feOffset><feSpecularLighting><feTile><feTurbulence>- SVG 教程:濾鏡效果