gpt4 book ai didi

jquery - Qtip基础问题

转载 作者:行者123 更新时间:2023-11-28 19:02:55 25 4
gpt4 key购买 nike

你好,

这是脚本的样子:

$(document).ready(function () {
$('#MyDiv').qtip({
content: 'I\'m at the top right of my target',
position: {
corner: {
target: 'topRight',
tooltip: 'bottomLeft'
}
}
});
});

这就是 html 的样子:

<div id="MyDiv">This is my Text</div>

MyDiv 元素没有绑定(bind) css。 div 元素放置在 Begin 表单标记内。

问题是工具提示会出现在右边(甚至不靠近 div)?

文档显示这应该有效,为什么不呢?

致以最诚挚的问候

最佳答案

您需要为 MyDiv 元素指定 CSS 宽度。 Qtip 将工具提示放在此 div 的右上角,并且 div 沿宽度方向扩展以填充它所包含的元素。

使用 Firebug(在 Firefox 中)或开发者工具(在 Internet Explorer 中)查看元素的尺寸,您应该会看到这一点。

关于jquery - Qtip基础问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4915739/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com