<fePointLight>
<fePointLight> 濾鏡基元定義了一個光源,允許建立點光效果。它可以在照明濾鏡基元中使用:<feDiffuseLighting> 或 <feSpecularLighting>。
使用場景
屬性
DOM 介面
此元素實現 SVGFEPointLightElement 介面。
示例
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">
<feSpecularLighting
result="spotlight"
specularConstant="1.5"
specularExponent="80"
lighting-color="#FFF">
<fePointLight x="50" y="50" z="220" />
</feSpecularLighting>
<feComposite
in="SourceGraphic"
in2="spotlight"
operator="arithmetic"
k1="0"
k2="1"
k3="1"
k4="0" />
</filter>
</defs>
<image
href="mdn_logo_only_color.png"
x="10%"
y="10%"
width="80%"
height="80%"
style="filter:url(#spotlight);" />
</svg>
結果
規範
| 規範 |
|---|
| 濾鏡效果模組級別 1 # fePointLightElement |
瀏覽器相容性
BCD 表格僅在瀏覽器中載入