Bootstrap 工具提示容器 =“body"滚动问题 [英] Bootstrap tooltip container="body" scroll issue
本文介绍了Bootstrap 工具提示容器 =“body"滚动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在下拉菜单中使用了引导工具提示.我在隐藏工具提示问题中得到了那个下拉菜单.
I used bootstrap tooltip inside of a dropdown menu. I got that dropdown inside hide tooltip issue.
所以我用 container="body"
解决了这个问题.
So I solve that with container="body"
.
现在我有另一个问题.该问题是如果在工具提示选择器元素中悬停滚动,则工具提示内容会移至顶部.
Now I have another issue. That issue is If scroll with hover in tooltip selector element then the tooltip content go to the top.
参考下面的截图.
推荐答案
我针对这个问题做了一个解决方案.也就是说,如果鼠标悬停在工具提示选择器元素上,然后在 & 中为该元素悬停添加脚本.out 触发事件以删除 &添加身体滚动.下面的例子:
I made a solution to this problem. That's if the mouse hovers the tooltip selector element then add a script for that element hover in & out trigger event to remove & add body scroll. Example below:
$(document).on({
mouseenter: function () {
$('body').css('overflow-y', 'hidden');
},
mouseleave: function () {
$('body').css('overflow-y', 'scroll')
}
}, 'YOUR_TOOLTIP_SELECTOR');
这篇关于Bootstrap 工具提示容器 =“body"滚动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文