在DIV里面让图片居中

.content.itemDiv{ display: table-cell;width: 171px;height: 133px;text-align: center; vertical-align: middle; background:url(../images/itembg2.png) no-repeat center;padding: 11px;}
<div class="content">
                    <div class="itemDiv">
                        <img src="images/item1.png">
                    </div>
                    <div class="itemDiv">
                        <img src="images/item4.png">
                    </div>
                    <div class="itemDiv">
                        <img src="images/item2.png">
                    </div>
                    <div class="itemDiv">
                        <img src="images/item3.png">
                    </div>
                    <div class="itemDiv">
                        <img src="images/item5.png">
                    </div>
     </div>

  

posted on 2015-06-30 13:47  防空洞123  阅读(189)  评论(0编辑  收藏  举报

导航