讓各種尺寸圖片在div居中
css代碼
.pro_img{ width:134px; overflow:hidden; height:250px;display: table;position: relative;text-align: center; background:#eee;}
.pro_img a{display: table-cell;vertical-align: middle;}
.pro_img a img{vertical-align: middle;max-width:130px; max-height:246px;}
htm代碼
<div class="pro_img"><a href="#" ><img src="123.jpg" ></a></div>