0
我想使用SVG過濾器只在三面(頂部,左側和右側)插入陰影。請參閱下面的代碼,在所有四面添加插入陰影,看看你是否可以幫我修改它,只在三面獲得陰影。謝謝!只在三面插入陰影SVG
<svg>
<filter id="inset-shadow" x="-50%" y="-1" width="200%" height="205%">
<feComponentTransfer in=SourceAlpha>
<feFuncA type="table" tableValues="1 0 0 0 0 0 0" />
</feComponentTransfer>
<feGaussianBlur stdDeviation="5"/>
<feOffset dx="0" dy="0" result="offsetblur"/>
<feFlood flood-opacity="0.9" flood-color="rgb(20, 0, 0)" result="color"/>
<feComposite in2="offsetblur" operator="in"/>
<feComposite in2="SourceAlpha" operator="in"/>
<feMerge>
<feMergeNode in="SourceGraphic" />
<feMergeNode />
</feMerge>
</filter>
<filter id="inset-shadow1" x="-50%" y="0" width="200%" height="200%">
<feComponentTransfer in=SourceAlpha>
<feFuncA type="table" tableValues="1 0" />
</feComponentTransfer>
<feGaussianBlur stdDeviation="5"/>
<feOffset dx="0" dy="-1" result="offsetblur"/>
<feFlood flood-color="rgb(20, 0, 0)" result="color"/>
<feComposite in2="offsetblur" operator="in"/>
<feComposite in2="SourceAlpha" operator="in" />
<feMerge>
<feMergeNode in="SourceGraphic" />
<feMergeNode />
</feMerge>
</filter>
</svg>