如何使 html table 的内容与任何屏幕分辨率兼容?
How make a content of a html table compatible with any screen resolution?
我有以下带有 <table>
的 html 代码,它也会在移动设备上显示,但遇到了问题。如果我在这个 table 中插入很多内容,在分辨率较小(屏幕较小)的设备中,内容将不会完全显示(会切断我网站的页脚)。
那如何根据下面的代码显示我网站的所有内容呢?
<html>
<body bgcolor="black">
<table width="100%" height="100%">
<tr>
<td align="center" valign="center">
<br />
<img width="100" height="100" src="myimage.png"> <br /><br />
<b><font color="white">My text...</font></b> <br />
<b><font color="white">My text...<p id="randomize"></p></font></b>
<b><font color="white">My text...<p id="lbpath"></p></font></b>
<br />
<img width="150" height="150" src="myimage2.gif"> <br />
<center>
<font color="yellow"><b>
<p id="label">My text...</p>
</b></font>
</center>
<b><font color="red">My text...</font></b><font color="white">My text...</font></td>
</tr>
</table>
</body>
</html>
是否需要为table设置高度?
<table width="100%">
一定能正常工作
我有以下带有 <table>
的 html 代码,它也会在移动设备上显示,但遇到了问题。如果我在这个 table 中插入很多内容,在分辨率较小(屏幕较小)的设备中,内容将不会完全显示(会切断我网站的页脚)。
那如何根据下面的代码显示我网站的所有内容呢?
<html>
<body bgcolor="black">
<table width="100%" height="100%">
<tr>
<td align="center" valign="center">
<br />
<img width="100" height="100" src="myimage.png"> <br /><br />
<b><font color="white">My text...</font></b> <br />
<b><font color="white">My text...<p id="randomize"></p></font></b>
<b><font color="white">My text...<p id="lbpath"></p></font></b>
<br />
<img width="150" height="150" src="myimage2.gif"> <br />
<center>
<font color="yellow"><b>
<p id="label">My text...</p>
</b></font>
</center>
<b><font color="red">My text...</font></b><font color="white">My text...</font></td>
</tr>
</table>
</body>
</html>
是否需要为table设置高度?
<table width="100%">
一定能正常工作