Spaces appear when using the <span> tag

Take a look at the code:

     <div class="banner_case_bg third">
                <span class="banner_case_bgl"></span>
                <span class="banner_case_bgc"></span>
                <span class="banner_case_bgr"></span>
            </div>

When I write the code like this, the effect of the page is as follows:

Insert picture description here
Obviously you can see a blank space between the 3 book shelves! Not good looking

There are many ways to change:

1. Directly change the html code part

            <div class="banner_case_bg third">
                <span class="banner_case_bgl"></span><span class="banner_case_bgc"></span><span class="banner_case_bgr"></span>
            </div>

PutspanThe part of the label is written on one line

*It is recommended not to do this, it is sloppy and ugly!

2. Change the css part

* Put the parent elementfont-sizeSet to 0

Insert picture description here
The result can be guessed: there are no blank spaces
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43814775/article/details/109036802