且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

引导按钮下拉列表响应表由于滚动不可见

更新时间:2023-01-11 14:13:18

我解决了这个问题,我把答案范围内帮助其他用户有同样的问题:在引导程序中,我们可以使用该事件来设置 overflow:inherited ,但如果您的父容器上没有css属性,这将工作。

I solved myself this and I put the answer in scope to help other user that have same problem : We have an event in bootstrap and we can use that event to set overflow: inherited but this will work if you don't have css property on your parent container.

$('.table-responsive').on('show.bs.dropdown', function () {
     $('.table-responsive').css( "overflow", "inherit" );
});

$('.table-responsive').on('hide.bs.dropdown', function () {
     $('.table-responsive').css( "overflow", "auto" );
})

这是小提琴

and this is the fiddle

info: 在这个小提琴的例子工作奇怪,我不知道为什么,但在我的项目工作很好。

info: In this fiddle example works strange and I'm not sure why but in my project works just fine.