DIV居中显示
2016-06-11 14:34
253 查看
<!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> DIV居中显示</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body { font-size:12px;font-family:tahoma;}
div {
width:1003px;height:600px; background-color:#000000; position:absolute; left:50%; top:50%; margin-left:-501.5px; margin-top:-300px
}
</style>
</head>
<body>
<div ></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> DIV居中显示</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body { font-size:12px;font-family:tahoma;}
div {
width:1003px;height:600px; background-color:#000000; position:absolute; left:50%; top:50%; margin-left:-501.5px; margin-top:-300px
}
</style>
</head>
<body>
<div ></div>
</body>
</html>
相关文章推荐
- 【无线传感网】:无线传感网复习
- 新博客地址
- [置顶]在linux中连接wifi
- [置顶]磁盘分区以及解决反序安装操作系统所带来的困扰
- 2016计蒜之道-初赛-第四场-A-淘宝流量分配
- 将博客搬至CSDN
- DIV垂直居中
- CenOS下firefox browser (火狐浏览器)无法播放网页音乐的解决方法
- c++之string.find(string)
- c++错误代码1
- 构建之法阅读笔记05
- 获取月的第一天和最后一天的日期
- Java基本特征
- Shell脚本编程之函数
- Java for Web学习笔记(二一):EL(1)什么是EL
- 构建WebIM聊天程序
- Visual Studio2008 和2010 运行程序出现的黑框立即消失解决方法
- 数据库子查询
- C#中DataGridView控件绑定控件绑定数据源方式
- leetcode 203 Remove Linked List Elements C++