我需要获得响应式表格,因此在小型设备上,我将 overflow-x:auto
添加到其父级,并将 table-layout:fixed
添加到表格。
代码在这里
HTML
<div class="class1">
<table class="class2">...</table>
</div>
CSS
.class1{overflow-x:auto}
.class2{width:640px,table-layout:fixed}
但是在 iPhone 上,当我点击行时,tr
-s 表现得很奇怪,高度开始增加。
有没有人遇到同样的问题或者知道解决方案?
最佳答案
根据我的经验,问题不在 table-layout:fixed
或 overflow: auto
中。他们都在设备上运行良好。您可以尝试将 overflow-y:hidden
添加到 .class1
关于html - 表格布局 :fixed behaves odd on iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27171776/