Bootstrap Tooltips initialising but not showing

你离开我真会死。 提交于 2019-12-11 11:23:51

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/12172379/bootstrap-tooltips-initialising-but-not-showing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!