Solution to the gap between img pictures inserted into li_CSS/HTML
May 16, 2016 pm 12:03 PMAdd style directly img{vertical-align:bottom; display:block}
Of course, it doesn't work in some cases. For example, I want to add three pictures, top, middle and bottom. The middle picture is set as the background. I found that this method is invalid. It's just that the gaps between the top and middle pictures are gone, and the bottom and middle pictures are gone. There is still something in between. The method is very simple. Change vertical-align:bottom to top. You can set the parameters of vertical-align according to the different situations you encounter.
Method 1:
img{vertical-align:top; display:block }
Method 2: Set container font-size:0 (I personally think this method is the best!!!)

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to change the src attribute of img in jquery
