[英]Multiline in SVG <title> (Internet Explorer) | Linebreak, tabulations
I would like to add a multiline tooltip to my SVG path using the <title>
tag.我想使用
<title>
标签向我的 SVG 路径添加多行工具提示。
It works perfectly in Chrome, but the linebreak characters I have tried result in a space in Internet Explorer.它在 Chrome 中完美运行,但我尝试过的换行符导致 Internet Explorer 中出现空格。
Also in Internet Explorer, the multiline works in the title=""
attribute.同样在 Internet Explorer 中,多行在
title=""
属性中起作用。
The below code snippet has the same muliline tootltip on a svg and on a button.下面的代码片段在 svg 和按钮上具有相同的 muliline tootltip。 To be run in IE.
要在 IE 中运行。
<svg height="100" width="100"> <path d="M45 0 L15 80 L75 80 Z"> <title>test
test</title> <!--<title>test
test</title>--> <!--<title>test test</title>--> <!--<title>test test</title>--> </path> </svg> <div><button title="test
test">It works here</button><div>
I would like to add a multiline tooltip to my SVG path using the <title>
tag.我想使用
<title>
标签将多行工具提示添加到我的SVG路径。
It works perfectly in Chrome, but the linebreak characters I have tried result in a space in Internet Explorer.它在Chrome中完美运行,但是我尝试过的换行符导致Internet Explorer中出现空格。
Also in Internet Explorer, the multiline works in the title=""
attribute.同样在Internet Explorer中,多行可在
title=""
属性中使用。
The below code snippet has the same muliline tootltip on a svg and on a button.以下代码段在svg和按钮上具有相同的muliline tootltip。 To be run in IE.
要在IE中运行。
<svg height="100" width="100"> <path d="M45 0 L15 80 L75 80 Z"> <title>test
test</title> <!--<title>test
test</title>--> <!--<title>test test</title>--> <!--<title>test test</title>--> </path> </svg> <div><button title="test
test">It works here</button><div>
在 ReactJS 中,这对我有用:
<svg><title>text1+{'\n'}text2</title></svg>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.