如何在bootstrap tooltip CSS/Jquery中提到的文本中使单词变为粗体

use*_*234 5 css jquery twitter-bootstrap

我试图在悬停在图像上时显示引导工具提示.我在工具提示中有一个文本,我需要将其设为粗体.

我从上面提到的来源尝试了这个,但是没有形成我的工作..

  <button class="infoTipsBox" type ="button" data-toggle="tooltip" data-placement="right"data-original-title='<b>big tooltip</b>'>      
  </button>
Run Code Online (Sandbox Code Playgroud)

JS:

$(function () {
        $('[data-toggle="tooltip"]').tooltip();
    });
Run Code Online (Sandbox Code Playgroud)

我做错了什么?在title属性的上述文本中,我试图以粗体字形成"bootstrap tooltip"并以普通字体休息.我怎样才能实现这一目标?

Arp*_*yal 7

正如你在Bootstrap官方documnetation for tooltip中看到的那样

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.
Run Code Online (Sandbox Code Playgroud)

所以,添加data-html="true"到您的工具提示,这将在您的工具提示中启用HTML