DIV+CSS布局中垂直居中的实现。
<html>
<head>
<style>
body{TEXT-ALIGN: center;}
#center{ MARGIN-RIGHT: auto;
MARGIN-LEFT: auto;
height:200px;
background:#F00;
width:400px;
vertical-align:middle;
line-height:200px;
}
</style>
</head>
<body>
<div id="center"><p>test content</p></div>
</body>
</html>
如何使文本在DIV+CSS布局中垂直居中?
2014-07-25 发布:zhushican | 分类:建站教程 | 评论:0 | 浏览: