css图片垂直居中
一.style代码
.case-pic{
height: 125px;
position: relative;
text-align: center
}
.case-pic span{
display: inline-block;
height: 100%;
vertical-align: middle;
}
.case-pic .img{
height: 60px;
vertical-align:middle;
}
二.html代码
<div class="case-pic"><span></span><img src="public/images/case_1.jpg" alt="" /></div>