冻结html表格中的标题 [英] freezing header in a table in html
本文介绍了冻结html表格中的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在这里,我有一张桌子,我想在滚动时修复该标题
Here, I have one table, i want to fix that header while scrolling
JS
<script>
$('#scroll').scroll(function(){
if ($('#scroll').scrollTop() > 10){
$("thead").css({
position: 'fixed',
top: '68px'
});
}else{
$('thead').css({
position: 'static'
});
}
});
</script>
这是完美的工作,但是设计正在改变.
This is working Perfectly, but design is changing.
有人可以帮我吗?
谢谢.
编辑
推荐答案
我得到了固定标头的解决方案,我使用了 http://fixedheadertable.com/.
I got solution for fixed header, i used http://fixedheadertable.com/.
感谢您的支持
这篇关于冻结html表格中的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文