水平居中
1、
HTML
<div class="test">
<img src="images/mlbtag.jpg" alt="" class="test2">
</div>
CSS
.test{
width: 100%;
}
.test2{
margin: 0 auto;
display: block;
}
2、
HTML
<div class="test">
<img src="images/mlbtag.jpg" alt="" class="test2">
</div>
CSS
.test{
width: 100%;
text-align: center;
}