码迷,mamicode.com
首页 > Windows程序 > 详细

css实现弹出窗体始终垂直水平居中

时间:2017-05-12 20:27:13      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:方法   属性   ble   baseline   tle   oct   content   bsp   osi   

<!DOCTYPE html><html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.softwhy.com/" />
<title>蚂蚁部落</title>
<style type="text/css">
body{
  height:1000px;
}
.antzoen{
  position:fixed;
  width:250px;
  height:100px;
  background:#ececec;
  left:50%;
  top:50%;
  margin-left:-125px;
  margin-top:-50px
}
</style>
</head>
<body>
<div class="antzoen"></div>
</body>
</html>


可是这样的方法ie6不支持fixed属性。可是如今大多不再考虑ie6。

所以尽能够放心使用。

css实现弹出窗体始终垂直水平居中

标签:方法   属性   ble   baseline   tle   oct   content   bsp   osi   

原文地址:http://www.cnblogs.com/jhcelue/p/6846959.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!