如果我检查 official documentation ,我可以看到一个叫做 HTML 的属性:
Name | Type | default | Description
----------------------------------------------------------------------------
html | boolean | false | Insert html into the tooltip.
If false, jquery's text method
will be used to insert content
into the dom. Use text if you're
worried about XSS attacks.
上面写着“将 html 插入工具提示”,但类型是 bool 值。如何在 Tooltip 中使用复杂的 html?
最佳答案
这个参数只是关于你是否要在工具提示中使用复杂的html。设置为 true
然后将html打入title
标签的属性。
看这个 fiddle here - 我通过 data-html="true"
将 html 属性设置为 true在 <a>
标记,然后只是添加在 html ad hoc 中作为示例。
关于javascript - 我可以在 Twitter Bootstrap 的工具提示中使用复杂的 HTML 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13704789/