我们如何冻结html表中的第一列和标题(具有多行) [英] How can we freeze first column and header(which have multiple rows) in html table

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

问题描述

我尝试了很多解决方案来冻结第一列和标题(具有多行),但是在每种解决方案中,我都必须使用用户自定义CSS(根据解决方案使用CSS).

I have tried so many solutions to freeze first column and header(which have multiple rows) but in every solution i have to user custom css (css according to solutions).

就我而言,我无法更改以前的CSS.我想要在div滚动时可以冻结我的表的代码(这是动态的).

In my case I cannot change my previous css. I want code in which on div scroll I can freeze my table(which is dynamic).

请提供解决方案.

推荐答案

实现我的彗星jquery和css使用.这里是插件:链接

To achieve what I comets jquery and css use. Here the plugin:link

这是一个jQuery插件,可以使表的行和列不滚动.

This is a jQuery plugin that can make table rows and columns not scroll.

它可以采用给定的HTML表对象并对其进行设置,以便可以冻结给定数量的列或行或同时冻结这两者,因此固定的列或行不会滚动.

It can take a given HTML table object and set it so it can freeze a given number of columns or rows or both, so the fixed columns or rows do not scroll.

要冻结的行应放在表头部分.

The rows to be frozen should be placed in the table head section.

它还可以冻结行和列,并结合使用colspan或rowspan属性.

It can also freeze rows and columns combined with using colspan or rowspan attributes.

这篇关于我们如何冻结html表中的第一列和标题(具有多行)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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