Answer the question
In order to leave comments, you need to log in
How to set inner shadow for svg?
Hello. You need to set an inner shadow for path. I found a filter on Habré, here:
<filter id="inset-shadow">
<!-- Сдвиг тени -->
<feOffset dx="0" dy="0"></feOffset>
<!-- Размытие тени -->
<feGaussianBlur stdDeviation="20" result="offset-blur"></feGaussianBlur>
<!-- Инвертируем drop shadow
чтобы создать внутреннюю тень -->
<feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"></feComposite>
<!-- Цвет и Прозрачность -->
<feFlood flood-color="black" flood-opacity="0.65" result="color"></feFlood>
<!-- Обрезаем цвет внутрь тени -->
<feComposite operator="in" in="color" in2="inverse" result="shadow"></feComposite>
<!-- Раcполагаем тень поверх элемента -->
<feComposite operator="over" in="shadow" in2="SourceGraphic"></feComposite>
</filter>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question