我一直在修补这个太久了,所以我在这里提出了问题。我试图在网页的顶部有一个菜单栏。我的方法存在的问题是内容页面在菜单栏后面滚动,导致DataTable/FixedHeader出现问题。它不是在菜单中停止表格的标题,而是滚动到菜单并锁定在屏幕的顶部。 。FixedHeader和固定菜单栏
的CSS看起来像这样
#header {
width:100%;
height:50px;
position: fixed;
top:0;
background-color:rgba(255,0,0,0.5);
}
#content {
background-color:rgba(0,0,255,0.5);
position: static;
margin-top: 50px;
}
有什么我可以做停止滚动浏览表一路攀升和标题停止菜单下方?
删除'position:fixed;'或更改'top:0' ..? – Popnoodles
属性是“保证金”,而不是“保证金”,您也可以尝试“填充顶部”,看看是否有帮助 – arieljuod
@arieljuod:良好的捕获,但没有这样做。 – orange