【发布时间】:2020-02-05 06:26:13
【问题描述】:
我目前正在处理一个 html 表格,这就是我目前所拥有的:
<table class='table' id="intern_table" style='display: block; overflow-x: auto; white-space: nowrap;' >
<thead>
<tr id="intern_table_title" style="color: black">
<th scope="col" class='text-center'>Industry Category</th>
<th scope="col" class='text-center'>Name</th>
<th scope="col" class='text-center'>Job Category</th>
<th scope="col" class='text-center'>Job Name</th>
<th scope="col" class='text-center'>Job Location</th>
<th scope="col" class='text-center'>Deadline</th>
<th scope="col" class='text-center'>hits</th>
</tr>
</thead>
<tbody>
....
</tbody>
</table>
由于我想让表格中的元素不换行,这意味着如果发生溢出,我想让它可以滚动,所以我在表格元素中添加了这个:
<style='display: block; overflow-x: auto; white-space: nowrap;'>
它可以在除 IOS 系统之外的所有不同设备上成功运行。另外,我尝试将overflow-x: auto 修改为overflow-x:touch,但该表仍然无法在IOS 设备上滚动。关于如何解决这个问题的任何想法?提前致谢。
【问题讨论】:
-
您使用的是哪个 iOS 设备?
标签: html ios css scroll overflow