嗨,我目前正在使用引導程序。我有一張桌子,裏面有很多列。我想用定義的寬度修復表格的前三列,並使表格水平滾動。我有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。如果有人能提供幫助,我將非常感激。
UPDATE:
小提琴 - http://jsfiddle.net/6txc8dLb/
您可以加入小提琴,以幫助... –
我喜歡你的文字表,你應該使用;)的[修正了水平滾動欄] –
可能的複製(HTTPS ://sackoverflow.com/questions/18826775/fix-columns-in-horizontal-scrolling) –