【发布时间】:2020-07-22 20:44:00
【问题描述】:
我只有一个没有媒体查询的简单页面,在响应式设计模式下看起来很棒,但在我的手机上却不行。
在响应式设计模式中,表格完全适合。 (Safari、Chrome 和 Firefox)
但是,在我的 375 像素测试手机(iPhone 6s)上,最后一列(21 像素图像)不适合,必须水平滚动才能看到。 (Safari、Chrome 和 Firefox)
我删除了手机缓存并确保 Safari 偏好设置中的页面缩放为 100%。
视口设置正确:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
这可以修复吗?我希望问题不在于响应式设计编辑器,因为如果是这样,如果它们与实际手机不匹配,它们就不是很有用。
.dt { border-collapse:collapse; font:11px Arial; }
.dt caption {background:black; color:orange;}
.dt th {font-size:12px; background: gainsboro; border:1px solid silver; padding:4px;}
.dt caption+tbody tr:nth-child(2) td:first-child {background:white; font-weight:normal; font-size:11px; text-align:left}
.dt td {border:1px solid silver; padding:3px; text-align:center}
.dt div {width:21px; height:12px; background:lightgreen}
<table class="dt">
<caption>Title</caption>
<tr>
<th>Brand</th>
<th id=AAcapacity>CapacityXF</th>
<th>XF?</th>
<th>1+2 star<br>
reviews</th>
<th># reviews</th>
<th>Price per 8</th>
<th>Pic
</th>
</tr>
<tr>
<td>Raspberry</td>
<td class="lg">2800</td>
<td>-</td>
<td>7%</td>
<td>385</td>
<td>$13.99</td>
<td><div></div></td>
</tr>
<tr>
<td>Blueberry</td>
<td class="lg">2700</td>
<td>XTC</td>
<td>10%</td>
<td>585</td>
<td>$15.99</td>
<td><div></div></td>
</tr>
</table>
【问题讨论】:
标签: css iphone mobile responsive