Bootstrap工具提示已初始化但未显示 [英] Bootstrap Tooltips initialising but not showing

查看:117
本文介绍了Bootstrap工具提示已初始化但未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置Bootstrap工具提示,但似乎没有用.

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>​

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

我已经设置了以下 jsFiddle

html似乎已转换为以下内容:

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>

然后呈现工具提示html:

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>

使用正确的CSS样式:

With the correct CSS styles:

但是它永远不会在浏览器中显示吗?

But it is never shown in the browser?

推荐答案

它确实有效,只是在jsfiddle中,隐藏了HTML框之外的所有内容.

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

更新版本以显示填充: http://jsfiddle.net/ytpAy/3/

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

弗雷德

这篇关于Bootstrap工具提示已初始化但未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆