跟页面尺寸相关的一些问题记录
w1.弹出框在页面上的显示的问题:The scroll bar should exist in the bottom of the screen, so that user can view the columns in any screens.
滚动条应该在页面screen的最下面,而不应该在所以记录的最下面
解决办法:
$(function(){
SetContentHeight();
$(window).resize(function(){
SetContentHeight();
});
function SetContentHeight() {
var height = $(window).height() - $('#uploadhistory').offset().top;
if(!isNaN(height) && height > 0) {
$('#uploadhistory').css('min-height', height);
$('#uploadhistory').css('max-height', height);
}
}
})();
2.set the dialog with right size based on window size, and add scrool bar if needed
解决办法:
.modal-content .modal-body{
overflow-y: auto;
max-height: calc(100vh - 200px);
}
可以只在显示内容的区域加滚动条,而不是在整个模态框上面加滚动条