Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我到目前为止的代码,但它并不好
<svg width="200" height="13"> <g id="layer1"> <text style="font-size:13px;font-family:Arial;" x="0" y="13" id="">THIS IS A TEST</text> </g> </svg>
我试图让文本完全适合框等。还需要为其添加背景颜色。
这可以服务:
<svg baseProfile="full" width="200" height="13"> <g id="layer1"> <rect width="100%" height="100%" fill="red" /> <text style="font-size:13px;font-family:Arial;" x="0" y="13" id="">THIS IS A TEST</text>