如何冻结表的头和左列 [英] How to freeze header and left columns of the table

查看:245
本文介绍了如何冻结表的头和左列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想修复表格的标题和3个左列。

I want to fix header and 3 left columns of my table.

但我发现只有一个可以解决的问题。以下是链接: http://hazaa.com.au/blog/how-to-create-an-html-table-with-frozen-headers-and-columns/

But i found only one situable solution. Here is link: http://hazaa.com.au/blog/how-to-create-an-html-table-with-frozen-headers-and-columns/

我需要把我的表分成4个独立的表,这不好。
同时我找到插件 http://www.fixedheadertable.com/ (作为另一个

I need to divide my table to 4 independed tables and that's not good. Also i found plugin http://www.fixedheadertable.com/ (as suggestion in another such question on SO) unfortunally it can freeze only one left column(i need 3 columns).

有没有其他简单的方法来实现这个功能?

Are there any other simple ways to implement this feature?

推荐答案

标准html表不支持冻结列,即使使用css。

the standard html table does not support frozen columns, even with css.

if您可以使用jquery插件,我建议您使用 http://www.datatables.net/ 与fixedcolumns插件(只是配置,它的工作原理:))

if you can use a jquery plugin, i suggest you to use http://www.datatables.net/ with the fixedcolumns plugin (just configure and it works as supposed :) )

如果不是,你会得到u解决方案,你havo拆分表中的一个或另一种方式,如果你想有可滚动表,你必须使用javascript,因为css和html不支持这样的功能。

if not, you will end up with u solution where you havo to split up the table in the one or the other way, and if you want to have scrollable tables you will have to use javascript since css and html do not support such features yet.

这篇关于如何冻结表的头和左列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆