[英]Bootstrap Tooltips initialising but not showing
I am trying to set up Bootstrap Tool Tips and it doesn't seem to be working. 我正在尝试设置Bootstrap工具提示,但似乎没有用。
<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 我已经建立了以下jsFiddle
The html appears to be transformed to the following: html似乎转换为以下内容:
<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: 并呈现工具提示html:
<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: 使用正确的CSS样式:
But it is never shown in the browser? 但是它永远不会显示在浏览器中吗?
It does work, it's just that in jsfiddle, everything outside the HTML box is hidden. 它确实起作用,只是在jsfiddle中,HTML框之外的所有内容都被隐藏了。
Updated version to show padding: http://jsfiddle.net/ytpAy/3/ 更新版本以显示填充: http : //jsfiddle.net/ytpAy/3/
Fred 弗雷德
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.