div居中显示


div 居中显示

方案一:

<div  style="border-bottom:1px dashed #00a0e9 ;margin:0 auto ;margin-bottom:10px;padding-bottom:10px;height:140px;text-align:center ; ">
<div style="margin:0 auto ;text-align:center;display:inline-block; " >
<div style="float:left;width:110px"><img src="/module/name/12/4361.png" style="width:110px;height:110px">子鼠</div>
<div style="float:left;width:110px"><img src="/module/name/12/4362.png" style="width:110px;height:110px">丑牛</div>
<div style="float:left;width:110px"><img src="/module/name/12/4363.png" style="width:110px;height:110px">寅虎</div>
</div>



方案二:


解决方案是:

父元素text-align:center

当前DIV设置display:inline-block;


相关标签:


评论: