是.它支持title属性中的html.
来自foundation.tooltip.js:
create : function ($target) {
var $tip = $(this.settings.tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
...
Run Code Online (Sandbox Code Playgroud)
打破它创建一个包含在a中的新元素div,并将title属性的内容插入到div使用该html()方法中,该方法将字符串中的任何标记转换为html元素.
以下代码:
<img src="example.png"
class="general-infotip has-tip tip-top"
data-tooltip
title="<b>This is bold</b> This is not" />
Run Code Online (Sandbox Code Playgroud)
将导致工具提示看起来像
这很大胆这不是