好了,废话不多说,直接上代码:
HTML:
<div class="img_wrap"> <h5><a href="/info/detail-3"><im g src="/static/images/logo.png" alt="logo" /></a></h5> </div>
CSS:
.blue .img_wrap { width: 137px; height: 32px; &n bsp; text-align: center; } .blue .img_wrap h5 { width:137px; height:32px; line-height:32px; /* 行高等于高度 */ } .blue .img_wrap h5 img { *margin-top:expression((400 - this.height )/2); / * CSS表达式用来兼容IE6/IE7 */ vertical-align:middle; display:inline-block; }
评论前必须登录!
注册