Home  >  Article  >  Web Front-end  >  Default spacing of inline-block elements is cleared

Default spacing of inline-block elements is cleared

php中世界最好的语言
php中世界最好的语言Original
2018-03-22 17:40:582211browse

This time I will bring you the default spacing of inline-block elements. What are the precautions for clearing the default spacing of inline-block elements? The following is a practical case, let's take a look.

Without further ado, let’s look directly at the sample code




    
    
    

    

默认状态

    

        

盒子1

        

盒子2

        

盒子3

        

盒子4

        

盒子5

    

    

方法一         letter-spacing: -0.5em

    

        

盒子1

        

盒子2

        

盒子3

        

盒子4

        

盒子5

    

    

方法二        font-size: 0

    

        

盒子1

        

盒子2

        

盒子3

        

盒子4

        

盒子5

    

The implemented renderings are as follows

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Fixed on the left and adaptive layout on the right

opacity transparency filter for IE Compatible solutions

The above is the detailed content of Default spacing of inline-block elements is cleared. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn