当前位置: 代码迷 >> HTML/CSS >> html页面元素垂直居中的小步骤
  详细解决方案

html页面元素垂直居中的小步骤

热度:16   发布时间:2012-10-06 17:34:01.0
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>

  相关解决方案