javascript 标题和正文在数据表中不匹配

um6iljoc  于 2023-01-01  发布在  Java
关注(0)|答案(1)|浏览(115)

$('#example').DataTable({
                
                lengthMenu: [2, 4, 6],
                ordering: false,
                serverSide: false,
                processing: false,
                responsive: true,
                lengthChange: true,
                autoWidth: true,
                searching: false,
                scrollY: '200px',
                scrollX: false,
                scrollCollapse: true,
                bInfo : false,
                paging: false,
                lengthChange: false

            });

当我删除scrollY和scrollCollapse时,它修复了问题,但我的表无法滚动

g52tjvyc

g52tjvyc1#

删除“scrollY”、“scrollColapse”属性,然后为div标签设置“max-height”和“overflow”样式

max-height: 500px;
overflow-y: auto;

example here

相关问题