首页 > 网站 > WEB开发 > 正文

网页垂直居中

2024-04-27 14:31:43
字体:
来源:转载
供稿:网友
网页垂直居中<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/CSS"><!--.kkkk {background-color: #CCCCCC;}body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}--></style></head><body><table width="100%" border="1" cellpadding="0" cellspacing="0" class="kkkk" id="mainDiv"><tr><td align="center" valign="middle"><table width="200" border="1" cellspacing="0" cellpadding="0"><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table></td></tr></table><script type="text/javascript" language="Javascript">function OnResize(){window.document.getElementByIdx("mainDiv").style.height=document.documentElement.clientHeight + "px";}OnResize();window.onresize = OnResize;</script></body></html>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表