日期:2014-05-17  浏览次数:20702 次

html页面元素垂直居中的小方法

我们可以利用表格的垂直居中,然后表格宽高100%就可以了。

代码:

<html><head>

<meta http-equiv="content-type" content="text/html; charset=gb2312">

?

<title>The page is temporarily unavailable</title>

<style>

body { font-family: Tahoma, Verdana, Arial, sans-serif; }

</style>

</head><body bgcolor="white" text="black">

<table height="100%" width="100%">

<tbody><tr>

<td align="center" valign="middle">

The page you are looking for is temporarily unavailable.<br>

Please try again later.

</td>

</tr>

</tbody></table>

</body></html>