简体   繁体   中英

Bootstrap Tooltips initialising but not showing

I am trying to set up Bootstrap Tool Tips and it doesn't seem to be working.

<p>This is a <a href="#" title="A collection of words.">sentence</a> with a tooltip</p>​

and

$(document).ready(function(){
    $("a").tooltip();
});​

I have set up the following jsFiddle

The html appears to be transformed to the following:

<p>This is a <a href="#" data-original-title="A collection of words.">sentence</a> with a tooltip</p>

And the tooltip html is rendered:

<div class="tooltip fade top in" style="top: -34px; left: 20.5px; display: block; "><div class="tooltip-arrow"></div><div class="tooltip-inner">A collection of words.</div></div>

With the correct CSS styles:

在此处输入图片说明

But it is never shown in the browser?

在此处输入图片说明

It does work, it's just that in jsfiddle, everything outside the HTML box is hidden.

Updated version to show padding: http://jsfiddle.net/ytpAy/3/

Fred

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM