我对表格中的下拉按钮有一个问题,当它们响应并滚动激活时,下拉按钮不可见,因为overflow: auto;
属性.我该如何解决这个问题,以便在按钮折叠时显示按钮的下拉选项?我可以使用一些jQuery,但在我遇到左右滚动的问题后,我决定寻找另一种解决方案.
100
我对表格中的下拉按钮有一个问题,当它们响应并滚动激活时,下拉按钮不可见,因为overflow: auto;
属性.我该如何解决这个问题,以便在按钮折叠时显示按钮的下拉选项?我可以使用一些jQuery,但在我遇到左右滚动的问题后,我决定寻找另一种解决方案.
100
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: inherit
but this will work if you don't have the 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" );
})
info:
In this fiddle example works strange and I'm not sure why but in my project works just fine.