Html SVG文本标记:在鼠标上方显示标题?

Html SVG文本标记:在鼠标上方显示标题?,html,svg,Html,Svg,我有一个SVG文本元素,它被分割成多行,如下所示: <text class="label" text-anchor="middle"> <tspan x="0" y="0" dx="0" dy="0em">Managing</tspan> <tspan x="0" y="0" dx="0" dy="1em">director or...</tspan> </text> 管理 导演还是。。。 当我将鼠标移到文本上时,我想

我有一个SVG文本元素,它被分割成多行,如下所示:

<text class="label" text-anchor="middle">
<tspan x="0" y="0" dx="0" dy="0em">Managing</tspan>
<tspan x="0" y="0" dx="0" dy="1em">director or...</tspan>
</text>

管理
导演还是。。。
当我将鼠标移到文本上时,我想显示一个较长的短语“常务董事或总裁”

有没有一种简单的方法可以做到这一点,使用title属性或类似属性?我尝试为
文本
tspan
标记添加
title
属性,但似乎没有帮助

试试这个:

<text class="label" text-anchor="middle">
  <tspan x="0" y="0" dx="0" dy="0em">Managing</tspan>
  <tspan x="0" y="0" dx="0" dy="1em">director or...</tspan>
  <title>Managing director or president</title>
</text>

管理
导演还是。。。
总经理或总裁
SVG有自己的一组标记