<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>垂直对齐方式</title>
<style>
.box{height:200px;border:2px solid #000; text-align:center;}
.span1{ width:100px;height:200px;background:Red; display:inline-block; vertical-align:middle;}
.span2{ width:200px;height:100px;background:blue; display:inline-block; vertical-align:middle;} /*垂直水平居中对齐*/
</style>
</head>
<body>
<div class="box">
<span class="span1"></span>
<span class="span2"></span>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>垂直对齐方式</title>
<style>
.box{height:200px;border:2px solid #000; text-align:center;}
.span1{ width:100px;height:200px;background:Red; display:inline-block; vertical-align:middle;}
.span2{ width:200px;height:100px;background:blue; display:inline-block; vertical-align:middle;} /*垂直水平居中对齐*/
</style>
</head>
<body>
<div class="box">
<span class="span1"></span>
<span class="span2"></span>
</div>
</body>
</html>