Is it possible to generate a box-shadow that follows the shape of a clip-path polygon?

前端 未结 3 1392
温柔的废话
温柔的废话 2020-12-28 15:31

Let\'s say I have this clip path (a triangle generated here)

-webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
clip-path: polygon(50% 0%, 0% 100%, 100%         


        
3条回答
  •  清酒与你
    2020-12-28 16:05

    It's not possible, I think. I would suggest you this work around.

    .triangle {
    font-size:100px;
    color:blue;
    text-shadow:0 0 10px black;
    }

提交回复
热议问题