SVG 文本多行
好吧,我有一些文本,想知道当窗口变小时使其在一行上自动跨越多行的最佳方法是什么?
Ok so I have some text and was wondering what the best way to get it to automatically span several lines when the window gets to small for it to be on one line?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
并不是真正的答案,而是对 http://pastebin.com/gaQbW9LL 的回应。
一个相当明显的错误是您正在创建 html 元素,但在 svg 命名空间中:
这应该是,例如:
其中 xhtmlns 是
http://www.w3.org/1999/xhtml
。Not really an answer, but a response to http://pastebin.com/gaQbW9LL.
One rather obvious error is that you're creating html elements but in the svg namespace:
That should be, e.g:
where xhtmlns is
http://www.w3.org/1999/xhtml
.