【问题标题】:qTip2 - position of tooltipqTip2 - 工具提示的位置
【发布时间】:2016-03-29 08:20:55
【问题描述】:

我不知道如何设置工具提示的正确位置。我的对象有带有 html 结构的工具提示,它们位于屏幕的边缘,所以我看不到其中的大部分。我做了一个fiddle。只有 4 个带有工具提示的对象,但在我的项目中我有很多。

$('.qtip-show').qtip({
    position: {
        target: 'mouse',
    },
});

【问题讨论】:

    标签: jquery css jquery-plugins tooltip qtip2


    【解决方案1】:

    您可以在这里查看选项: http://qtip2.com/options

    在玩了一段时间后,它可以工作了。

    $('.qtip-show').each(function() { // Grab all elements with a title attribute,and set "this"
        $(this).qtip({ // 
            position: {
            my: 'top left',  // Position my top left...
            at: 'bottom left', // at the bottom right of...
            target: $(this) // my target
        }
        });
    });
    

    完整代码在这里: http://codepen.io/anon/pen/GZvomK

    最好的, 乔治

    【讨论】:

    • 感谢您的帖子,但我不确定如何使用它 - 我更新了我的小提琴:jsfiddle.net/h49Loejs/4
    • 谢谢 :) 但是当我将它粘贴到我的小提琴中时,它每次都显示在同一个地方,你能看一下吗? :) jsfiddle.net/h49Loejs/5
    • 非常感谢,但是看,当您将(例如)“while( i
    • 这是您使用的库的限制,对此我无能为力。尝试直接联系开发人员,看看他/她是否有解决方案。祝你好运:)
    • 如前所述,您需要与开发人员取得联系,他们肯定会知道。 Np,我的荣幸:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多