Css is used to surround the picture. How did this white area come from?

clipboard.png
html6imgcss


html6img


:
clipboard.png

Css
Mar.16,2021

whitespace is caused by blank lines between img tags. The solution is to set the font-size of the parent element of the img tag to 0 or write the img tag more compactly as
as

.

here is the implementation

        body {
            margin: 0;
            padding: 0;
            font-size: 0;
        }
        img {
            padding: 0;
            margin: 0;
            display: inline-block;
            width: 33.3vw;
            height: 33.3vw;
            background-color: green;
        }
        img:first-child {
            float: left;
            width: 66.6vw;
            height: 66.6vw;
        }

the baseline of the elements in the line is in trouble. Img is an inline element, and the default display: inline; is similar to the default behavior of the text, with the bottom edge aligned to the baseline rather than the bottom edge of the container. Set fontsize to 0.
Portal CSS deeply understands the relationship between vertical-align and line-height


it is suggested that the font-size of the parent element of the img tag be set to 0,


you can use the Grid layout of CSS


commonly known as" ghost blank node ". For details, please refer to Zhang Xinxu's blog and add font-size:0 to the parent tag of the img tag.


img tag inline elements. By default, inline elements. In order to make the elements on a line have a uniform reference alignment object, there is a setting of baseline alignment by default. Because there is a baseline, there is only one more gap. Vertical-align: baseline (default) / top/bottom;

can be solved by changing the alignment object within the line.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36ea1-2c034.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36ea1-2c034.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?