首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

怎的使一个层垂直居中于浏览器中

2012-10-07 
怎样使一个层垂直居中于浏览器中!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:

怎样使一个层垂直居中于浏览器中
<!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>
  <title> new document </title>
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <style type="text/css">
  <!--
div{
border:1px solid red;
height:200px;
left:50%;
margin:-100px 0 0 -100px;
position:absolute;
top:50%;
width:200px;
}
  -->
  </style>
</head>

<body>
  <div></div>
</body>
</html>

热点排行