I assume that you mean whether it is possible to create a shadow along a polygon. If yes, then no. box-shadowUnfortunately, it is only a βboxβ, so it cannot follow the clip. It will continue to apply to the rectangle of the element itself.
However, you could associate it with another element that has the same clipping but sets below it and offsets and creates a pseudo-shadow:
#box {
position: relative;
width: 200px;
height: 200px;
}
#content {
width: 100%;
height: 100%;
background: #3CF;
-webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 80% 100%);
}
#shadow {
position: absolute;
z-index: -1;
content: "";
background: rgba(0, 0, 0, .5);
width: 200px;
height: 200px;
left: 5px;
top: 5px;
-webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 80% 100%);
}
<div id="box">
<div id="content"></div>
<div id="shadow"></div>
</div>
Run codeHide result, , / , , .