SVG drop shadow using css3

后端 未结 7 1621
谎友^
谎友^ 2020-11-22 12:34

Is it possible to set drop shadow for an svg element using css3 , something like

box-shadow: -5px -5px 5px #888;
-webkit-box-shadow: -5px -5px 5px #888;
         


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 13:11

    I'm not aware of a CSS-only solution.

    As you mentioned, filters are the canonical approach to creating drop shadow effects in SVG. The SVG specification includes an example of this.

提交回复
热议问题