http://jsfiddle.net/kizu/4RPFa/4570/
<div class=frame>
<span class="helper"></span><img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=250 />
</div>
<div class=frame>
<span class="helper"></span><img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=25 />
</div>
<div class=frame>
<span class="helper"></span><img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=23 />
</div>
<div class=frame>
<span class="helper"></span><img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=21 />
</div>
<div class=frame>
<span class="helper"></span><img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=19 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=17 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=15 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=13 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=11 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=9 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=7 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=5 />
</div>
<div class=frame>
<span class="helper"></span>
<img src="https://i-blog.csdnimg.cn/blog_migrate/5bc7ff3bfb2bb09e7d665a976e7e7ec1.png" height=3 />
</div>
.frame {
height: 25px; /* equals max image height */
width: 160px;
border: 1px solid red;
white-space: nowrap;
text-align: center; margin: 1em 0;
}
.helper {
display: inline-block;
height: 100%;
vertical-align: middle;
}
img {
background: #3A6F9A;
vertical-align: middle;
max-height: 25px;
max-width: 160px;
}