html - 在 SVG 标题标签中添加换行符

标签 html css svg

是否可以在 SVG 标题标签中包含多行?

<title> Name: Jon \n Address: NY </title>

我尝试添加\n 并应用一些 CSS 来打破标题文本,但它不起作用

最佳答案

实际的换行符是有效的,或者至少它们在 Firefox、Safari 和 Chrome 中是有效的。

<svg>
  <rect width="300" height="150" fill="lime">
    <title> Name: Jon 
    Address: NY </title>
  </rect>
</svg>
  

关于html - 在 SVG 标题标签中添加换行符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66563053/

相关文章:

html - 创建黑白网格 HTML/CSS

css - 使用 Bootstrap 在容器右侧添加按钮

css -\e901 对 CSS 内容标签意味着什么?

css - 不能在同一行显示list和h1标签

html - CSS子菜单打扰了父级

jquery - 如何从 infragistic 表中获取值

javascript - 在绝对定位的 div 中需要一个固定定位的 div

javascript - 如何创建 flex 的 css 内容分隔符?

google-chrome - SVG 不会显示

php - 使 PHP 输出加粗