即使向下滚动,html表头也锁定在页面顶部

时间:2016-10-12 22:33:38

标签: python html python-2.7 pandas dataframe

我已使用Pandas DataFrame的to_html()style.render()来从CSV数据生成html页面。真酷!

但是当我向下滚动页面时,我忽视了列名称,这就是问题所在。

有没有办法将它挂在页面顶部?

1 个答案:

答案 0 :(得分:1)

这是你需要的吗?

#NAME HERE{ 
position: fixed; 
{

您也可以使用此代码执行宽度等...

 #NAME HERE{ 
 position: fixed; 
 bottom:0px; 
 right: 0; 
 width: 0px; 
 height: 0px;
 }

另外,如果您希望宽度跨越整个页面,只需将0px更改为100%也可以根据您的需要将“固定”更改为“绝对”