html页面元素垂直居中的小方法
12:17 | Author: Hui Li 李辉

我们可以利用表格的垂直居中,然后表格宽高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>



效果:

This entry was posted on 12:17 and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 评论: