简单的东西,在aspx页面中内容浏览器横向、垂直居中兼容IE9,Firefox21,Chrome27,代码如下:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>测试</title>
<style type="text/css">
html, body
{
height: 100%;
width: 100%;
}
</style>
</head>
<body >
<table style="height: 100%; width: 100%;">
<tr>
<td align="center">
内容
</td>
</tr>
</table>
</body>
</html>
“ 内容”可以是Table、DIV(其他还未测试)。