External div few more pixels than img

Today, the project found a few pictures do have inexplicable gaps below, but a closer look is not a div wrapped 3 img do? Nothing to do margin ah, a few hair loss, check no clue, try to set the row height, one less px. Ok. . . It seems the matter is not simple.

After verification, reason: img is inline elements, due to problems resulting from the baseline.

Solution:

1.img set to block-level elements

2.img vertical-align to top

Guess you like

Origin www.cnblogs.com/jack123/p/11511837.html