I'm using the clip-path
property to shape my block element.
clip-path: polygon(0 0, 100% 0, 100% 100px, 50% 100%, 0 100px);
I would like to put a "drop shadow" in that element. So, I've tried some techniques, like:
box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.5);
Or...
filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
See my test environment on CodePen.
Is it possible with CSS or SVG?
box-shadow
you can have on a clip-path is inset. The normal one is outside the element, hence getting clipped. – Jemybox-shadow
kept hidden even using theclip-path: inset(0)
(test only). – Liquidationinset
, @CaioTarifa, not theclip-path
. You can always useclip-path
on your element while wrapping it inside the same parent withposition:relative
along with ansvg
withposition:absolute
added solely for the purpose of getting the box-shadow effect. – Jemy