svg 文本居中
While text in SVG has a number of limitations, at least in the current spec - text can’t be wrapped, and positioning it is more like arranging elements in CSS, rather than the natural “flow” of HTML text - it also has some significant advantages in particular use-cases. Understanding those use-cases, together with the associated SVG text attributes, will allow you to know where and how to employ SVG text in your web page designs.
尽管SVG中的文本有很多限制,但至少在当前规范中-文本不能被包装,而放置它的方式更像是在CSS中 排列元素 ,而不是HTML文本的自然“流动”-它也有一些限制在特定用例中具有明显的优势。 了解这些用例以及相关的SVG文本属性,将使您知道在网页设计中在何处以及如何使用SVG文本。
As always, there’s more to be added to this list (especially as the SVG2 draft is finalised and its features adopted by browsers), so I would recommend checking back regularly.
与往常一样,此列表中还有更多要添加的内容(尤其是在SVG2草案完成后,浏览器采用了其功能),因此,我建议定期进行检查。
Time: 2 hours
时间: 2小时
Prerequisites: Intro to SVG, CSS Typography
翻译自: https://thenewcode.com/810/Web-Developer-Reading-List-SVG-Text
svg 文本居中