基本上我在包装内有2个图像(垂直对齐)。现在,我只需要将包装器置于体内。
我如何将包装物放在体内?
<!DOCTYPE html>
<html lang="es-ES">
<head>
<meta charset="utf-8">
<base href="<?php echo BASE; ?>">
<title>tittle goes here</title>
<meta name="description" content="descr goes here">
<style type="text/css">
body {margin: 0; padding: 0;}
.wrapper {background-color: red; display: inline-block;}
.wrapper span {display: inline-block; vertical-align: middle; margin: 0 20px;}
.wrapper span img {display: block;}
</style>
<body>
<div class="wrapper">
<span><a href=""><img src="..." width="225" height="60" alt="..."></a></span>
<span><a href=""><img src="..." width="120" height="120" alt="..."></a></span>
</div>
</body>
</html>
答案 0 :(得分:0)
尝试添加:
text-align: center; display: table-cell; vertical-align: middle;
到包装器。