css - line-height and pictures

Recently encountered a problem, obviously did not add additional padding and margin to the image tag, but the height difference between the picture and the picture

Review of elements found in common style, body has a line-height: 1.6 style

For picture, line-height picture can only be obtained through inheritance.

So this page Picture Style line-height is inherited from the parent element of the body, this page will not be used for a long time, for convenience, directly inline style line-height: 0 to

amendment:

<body style="line-height:0;">
<div>
    <img src="{{asset('weixin/k/k-top.jpg')}}" class="full-img">
    <img src="{{asset('weixin/k/k-top2.jpg')}}" class="full-img">
</div>
</body>

Guess you like

Origin www.cnblogs.com/gggggggxin/p/11597646.html
Recommended