Aligning text in SVG

前端 未结 2 2033
死守一世寂寞
死守一世寂寞 2020-12-24 10:38

I am trying to make SVG XML documents with a mixture of lines and brief text snippets (two or three words typically). The major problem I\'m having is getting the text align

2条回答
  •  悲哀的现实
    2020-12-24 10:57

    It turns out that you don't need explicit text paths. Firefox 3 has only partial support of the vertical alignment tags (see this thread). It also seems that dominant-baseline only works when applied as a style whereas text-anchor can be part of the style or a tag attribute.

    
    
      Vertical
    
    
    
    
      Horizontal
    
    
    
    
      Bit of Both
    
    

    This works in Firefox. Unfortunately Inkscape doesn't seem to handle dominant-baseline (or at least not in the same way).

提交回复
热议问题