gpt4 book ai didi

javascript - 更改工具提示位置/箭头

转载 作者:太空狗 更新时间:2023-10-29 16:39:19 27 4
gpt4 key购买 nike

我在我的区域 map 中有一个我正在使用的工具台 http://qtip2.com/

我调用工具提示时的代码与这个问题中的相同Tooltip on map area tag

jQuery(document).ready(function (e) {
jQuery('area').qtip({
style: {
classes: 'qtip-dark'
},
events: {
show: function(event, api) {
api.set({
'content.text': api.elements.target.attr('title')
});
}
}
});
});

但是我的工具提示总是在我所在区域的右下角,有什么办法可以让它在我的右上角吗?

最佳答案

找到以下对您有帮助的答案。

jQuery(document).ready(function (e) 
{
jQuery('area').qtip({
style:
{
classes: 'qtip-default qtip qtip-light qtip-rounded',
width: '250px',
height: '70px',
tip: true

},
position:
{
my : 'bottom left',
at: 'top right',
adjust: {
method: 'none none', // Requires Viewport plugin
resize: true
},
},
events:
{
show: function(event, api)
{

api.set
({
'content.text': api.elements.target.attr('title')
});

}
}
});
});

关于javascript - 更改工具提示位置/箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39724886/

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