谁能给我建议解决方案。
当我水平滚动时,标题不会随表格移动。标题位于 div 之外。
我正在参考以下内容jsfiddle
如果您将您的财产overflow: auto;
放在#topsection
并移除#table-container
,它会起作用。
#topsection {
background-color: white;
position: absolute;
top: 0;
margin: 0px;
height: 130px;
width: 100%;
overflow: auto;
padding: 0px;
}
#table-container {
background-color: white;
position: absolute;
top: 130px;
right: 0px;
bottom: 0px;
left: 0px;
margin: 0px;
padding: 0px;
width: 100%;
}
删除
overflow: auto;
您的 CSS 代码中的第 54 行