Inline block elements default margins issue

Row block elements within the default margins Solution:
horizontal: floating elements to
the vertical direction: 1, to an element-align = left Vertical: Top / bottom;
2, the element is converted into block-level element

 

Case:

(1)html

<div>
<img src="img/t.jpg" alt="">
</div>

(2)css

div{
border: 1px solid #000;
}
img{
vertical-align: top;
}

 

Guess you like

Origin www.cnblogs.com/msw0803/p/11525814.html