HTML-tags in tooltip [duplicate]

2019-08-29 03:34发布

This question already has an answer here:

Is it possible to show a tooltip in Twitter Bootstrap that uses html tags in it to give it some mark-up?

At the moment I'm using this code:

<a class="my-tooltip" rel="tooltip" href="#" data-original-title="CPR + O<sub>2</sub>.">First-Aid</a>

But it will just show CPR + 0<sub>2</sub> in the tooltip when I hover over it.

Can't it be done, or am I doing something wrong?

1条回答
可以哭但决不认输i
2楼-- · 2019-08-29 03:55

Add the attribute data-html="true" to your link

查看更多
登录 后发表回答