Image in tooltip using bootstrap?

前端 未结 1 429
无人共我
无人共我 2021-02-12 13:54


         


        
相关标签:
1条回答
  • 2021-02-12 14:27

    You have to pass in the html option to when you initialize .tooltip. e.g.

    <div class="cart"> 
        <a data-toggle="tooltip" title="<img src='http://getbootstrap.com/apple-touch-icon.png' />">
            <i class="icon-shopping-cart"></i>
        </a>
    

    $('a[data-toggle="tooltip"]').tooltip({
        animated: 'fade',
        placement: 'bottom',
        html: true
    });
    

    See the example fiddle

    0 讨论(0)
提交回复
热议问题