如何创建带有不同颜色文本的Bootstrap 5工具提示?
似乎添加双引号char “
到自定义HTML Tooltip将破坏工具提示本身,使浏览器认为工具提示标题已经结束,并将工具提示标题的一部分分解为外部HTML。
这是a jsfiddle 。
It seems that adding the double quote char"
to the custom HTML tooltip will break the tooltip itself, making the browser think that the tooltip title is over and parsing a chunk of the tooltip title as external HTML.
Here's a jsfiddle.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@poo的答案对我不起作用,当使用课程时,它给了我您正在搜索的答案。
这是 https://jsfiddle.net/p5bzmqd1/
The answer of @poo is not working for me, when using classes it gave me the answer you are searching for.
Here is a https://jsfiddle.net/p5bzmqd1/
将您的代码从双引号更新为标题属性中的单个引号。
Updated your code from double quotes to single quotes within the title attribute.