CSS3 filter: drop-shadow spread property alternatives

后端 未结 4 1858
半阙折子戏
半阙折子戏 2020-12-20 20:35

I\'m trying to use a CSS3 (webkit) drop-shadow filter to place a white glow around any given transparent png with approximately the same dimensions, and -webkit-filter

4条回答
  •  春和景丽
    2020-12-20 21:14

    Well, I figured out how to replace the non-functioning spread property using SVG filters. Big thanks to Michael Mullany though his answer wasn't 100% what I need. Here's the filter I'm using:

    
        
    
        
    
        
    
        
            
            
        
    
    

    feMorphology dilate operator replicates the functionality I wanted very nicely, making it easier to give the text a 'glow' effect that conforms a lot more strictly to the outline of the text.

    enter image description here

    (Oddly, feFlood does nothing and I'm unable to get a white glow, but that's a problem for another question. The filter also eats up 100% of a single core as long as it's open in a tab in the latest Chrome. Oh well.)

提交回复
热议问题