search

Home  >  Q&A  >  body text

bootstrap怎么使图片垂直居中?

bootstrap怎么使图片垂直居中?

<div class="mbrand">
                    <a href="#"><img src="img/mbarnd1.gif" class="img-responsive center-block"/></a>
                    <a href="#"><img src="img/mbarnd2.gif" class="img-responsive center-block"/></a>
                    <a href="#"><img src="img/mbarnd3.gif" class="img-responsive center-block"/></a>
                    <a href="#"><img src="img/mbarnd4.gif" class="img-responsive center-block"/></a>
                    <a href="#"><img src="img/mbarnd5.gif" class="img-responsive center-block"/></a>
                </div>

1.png

高洛峰高洛峰3045 days ago943

reply all(1)I'll reply

  • 三叔

    三叔2016-10-26 09:24:49

    把图片添加css类img-responsive center-block

    reply
    0
  • Cancelreply