【发布时间】:2021-03-20 23:21:22
【问题描述】:
您好,我目前正在使用引导程序。我有一个有很多列的表。我想用定义的宽度修复表格的前三列并使表格水平滚动。我有 12 列,想手动设置它们的宽度,以便更好地表示数据。该表如下所示:-
+-----+---------+-------------------+------------------+----------+---------
| No. | Id | Address | Numeric Category | Image 1 | Image 2 | Image 3 | Image 4 | Coordinates | | | |
+-----+---------+-------------------+------------------+----------+---------+---------+----------+-------------+--+--+--+
| 1 | 121 | 123, Ring Road | A | | | | | | | | |
| 2 | 122 | 123, Ring Road | B | | | | | | | | |
| 3 | 322 | 123, Ring Road |A | | | | | | | | |
| 4 | 222 | 123, Ring Road | | | | | | | | | |
| 5 | 212 | 123, Ring Road | | | | | | | | | |
+-----+---------+-------------------+------------------+----------+---------+---------+----------+-------------+--+--+--+
表格代码:-
<table class="table table-xxs">
<thead>
<tr class="active">
<th>S.No.</th>
<th>Response Id</th>
<th>Address</th>
<th>Category</th>
<th>Address</th>
<th>Image 1</th>
<th>Image 2</th>
<th>Image 3</th>
<th>Image 4</th>
<th>Coordinates</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
我对 css 或 javascript 知之甚少。正如我之前提到的,我使用的是引导主题。我想水平滚动表格并使 S.No、Id 和 Address 整列固定。我无法想到会涉及到的 css 或 js。如果有人能提供帮助,我将不胜感激。
更新:
【问题讨论】:
-
你能加个小提琴来帮忙吗...
-
我喜欢你的文本表,你应该使用它;)
-
@GopalkrishnaNarayanPrabhu 更新
标签: html css twitter-bootstrap