将顶部和底部svg文本对齐垂直

时间:2016-06-09 04:23:02

标签: svg vertical-alignment

我有一个由svg编写的段落如下:

svg source code

您能告诉我如何对齐顶部和底部的内容 它看起来像这样:

rendered output

1 个答案:

答案 0 :(得分:0)

这里有: 刚做, 字形取向垂直:90

<!DOCTYPE html>
    <html>
    <head>
        <title></title>
    </head>
    <body>
    <svg height="800" width="100%">
        <text x="500" y="50" font-size="22" text-anchor="inherit" style="writing-mode:tb; glyph-orientation-vertical:90">
            asdsd sdasadsa sad sad sadas sad
        </text> 

        <text x="470" y="50" font-size="22" text-anchor="inherit" style="writing-mode:tb; glyph-orientation-vertical:90">
            asdsd sdasadsa sad sad sadas sad
        </text> 

        <text x="440" y="50" font-size="22" text-anchor="inherit" style="writing-mode:tb; glyph-orientation-vertical:90">
            asdsd sdasadsa sad sad sadas sad
        </text> 

        <text x="410" y="50" font-size="22" text-anchor="inherit" style="writing-mode:tb; glyph-orientation-vertical:90">
            asdsd sdasadsa sad sad sadas sad
        </text> 

        <text x="380" y="50" font-size="22" text-anchor="inherit" style="writing-mode:tb; glyph-orientation-vertical:90">
            asdsd sdasadsa sad sad sadas sad
        </text> 

        <text x="350" y="50" font-size="22" text-anchor="inherit" style="writing-mode:tb; glyph-orientation-vertical:90">
            asdsd sdasadsa sad sad sadas sad
        </text> 
        

    </svg>

    </body>
    </html>