在html表中将第一列固定,并将下一列设置为可滚动 [英] Make first column fixed and next column scrollable in html Table

查看:632
本文介绍了在html表中将第一列固定,并将下一列设置为可滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个只有两列的表。我想让第一列是固定的,并且下一列可滚动在所有的rows..it应该可以作为一个整体水平滚动..不是个别列

I have a table with only two columns . i want to make first column is fixed and next column scrollable in all the rows..it should be horizontally scrollable as a whole .. not individual columns

的行。 。

我在 Jsfiddle

我没有太多的css风格。

I dont have much exposure to css styling.

推荐答案

您可以使用CSS overflow:auto; ,如 http://jsfiddle.net/Yw679/2/

You could use CSS overflow:auto;, as in http://jsfiddle.net/Yw679/2/

如果我理解正确,您希望整个左栏是静态的,并且整个右列(包括头部)可水平滚动。是正确的吗?

If I understand correctly, you want the entire left column to be static, and the entire right column (including the header) to be horizontally scrollable. Is that correct?

如果是这样,这是不可能的一个表。但有了一些额外的代码,可能有两个表,像这样: http://jsfiddle.net/Yw679/ 6 /

If so, it's not possible with one table. But with a bit of extra code, it's possible with two tables like this: http://jsfiddle.net/Yw679/6/

这篇关于在html表中将第一列固定,并将下一列设置为可滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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