简体   繁体   English

垂直滚动的表格和水平滚动的表格

[英]Table with vertical scroll and pages for horizontal

I have a table that have important information in left column and in the top row, therefore these should always be visible, I then want to have Pages in the bottem for horizontal "scrolling" and a normal scroll for vertical scrolling. 我有一个表格,该表格的左列和顶行都有重要信息,因此这些信息应始终可见,然后我希望在页面中具有Pages来进行水平“滚动”和正常滚动来进行垂直滚动。

Is there a Jquery script that supports this? 是否有支持此的Jquery脚本?

It would look something like this 看起来像这样 在此处输入图片说明

Does this work? 这样行吗? (I used CSS, not jQuery, sorry) (我使用CSS,而不是jQuery,对不起)

http://jsfiddle.net/mAnQp/ http://jsfiddle.net/mAnQp/

Update: added pages http://jsfiddle.net/mAnQp/3/ 更新:添加页面http://jsfiddle.net/mAnQp/3/

If your requirement is to display basic data then you could use one of the Jquery plugins available for this purpose like Datatables . 如果您需要显示基本数据,则可以使用为此目的可用的Jquery插件之一,例如Datatables They are very flexible and you could do most of the basic things using one of their extra's. 它们非常灵活,您可以使用其中一项附加功能来完成大多数基本操作。

If your requirement is more than just displaying data. 如果您的需求不仅仅是显示数据。 It has complex edits, custom features for each column and stuff then your better of with a custom implementation. 它具有复杂的编辑功能,每列的自定义功能和内容,然后您可以通过自定义实现更好地进行编辑。 We've build such a table which has integrated autopopulates, calendar and other completely custom features by having a div float beside the table and using Jquery to control the scroll. 我们通过在表旁边放置div浮点并使用Jquery来控制滚动来构建集成了自动填充,日历和其他完全自定义功能的表。 The header and the frozen column on the left are usually separate tables/divs themselves and are just aligned as per the table using Jquery. 标题和左侧的冻结列通常通常是单独的表/ div,并且使用Jquery按照表进行对齐。 They work quite well for IE 8+ and other browsers. 它们对于IE 8+和其他浏览器非常有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM