How to get an outline effect on text in SVG?

前端 未结 5 2022
南方客
南方客 2020-12-24 10:53

I just want a simple SVG image that has some arbitrary text on an angle, which I can do. Thing is, I also want the text to have a sort of \"outline\" effect. Like rather t

5条回答
  •  醉话见心
    2020-12-24 11:35

    You can use a for this, more specifically a combination with :

    
    
    
    
      
      
      
        
        
      
    
    
    
    
      
        Example
      
    
    
    

    You might have to tune the x/y/width/height attributes of the filter in order to adapt the filter canvas size, see also Humongous height value for not preventing cutoff or Gaussian blur cutoff at edges.

    I also created an interactive d3.js-powered demo to compare different solutions presented in this thread here with various settings to play around: https://bl.ocks.org/Herst/d5db2d3d1ea51a8ab8740e22ebaa16aa

提交回复
热议问题