如何使固定宽度 table 适合 phone 浏览器的全宽?
How to fit a fixed-width table to the full width of a phone browser?
在旧的网络应用程序中,布局主要由固定宽度完成 tables:
<div class="main">
<table width="520" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
</table>
</div>
有没有办法在首次加载页面时使上述固定宽度 (520px) table 适合移动 phone 浏览器窗口的宽度?
在您的 header 中添加此标签,它应该可以工作
<meta name="viewport" content="width=device-width, user-scalable=no" />
在旧的网络应用程序中,布局主要由固定宽度完成 tables:
<div class="main">
<table width="520" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
</table>
</div>
有没有办法在首次加载页面时使上述固定宽度 (520px) table 适合移动 phone 浏览器窗口的宽度?
在您的 header 中添加此标签,它应该可以工作
<meta name="viewport" content="width=device-width, user-scalable=no" />