How to center SVG text vertically in IE9

后端 未结 3 549
说谎
说谎 2021-01-07 20:43

In order to align text vertically in SVG one has to use the dominant-baseline attribute. This has already been discussed on SO (Aligning text in SVG) and is par

3条回答
  •  臣服心动
    2021-01-07 20:58

    You could try baseline-shift to see if that works in IE9:

    
    
        
        
            XXX dominant-baseline: auto; XXX
        
    
        
        
            XXX dominant-baseline: central XXX
        
    
        
        
          
            XXX baseline-shift: -30% XXX
          
        
    
    

    Firefox doesn't seem to support baseline-shift though, but Webkit and Opera do.

提交回复
热议问题