When the test block-level element differs from the in-line element, it is found that there should be no interval between the horizontal elements in the row within the line element.
1 <span>In-line elements</span>2 <span>In-line elements</span>3 <span>In-line elements</span>4 <span>In-line elements</span >
Effects such as:
This problem occurs because of the space between the span notes in the HTML. If you remove the space then there will be no spacing.
< span > inline elements </span><span> inline elements </ span >< span > inline elements </span>
Effects such as:
Although the problem is found, if there are multiple inline elements, the code squeeze on one line will cause reading difficulties, how to do?
Expand Reading : 1. "original" inline elements create a horizontal void is a bug?-Gondor-Blog Park
Http://www.cnblogs.com/PeunZhang/archive/2012/09/28/2706094.html
2. Http://davidwalsh.name/remove-whitespace-inline-block
Through the Internet search data, found that "the spacing between the elements of the line, is due to line breaks, tab (tab), space and other characters caused, and the size of the character is defined font size to control ", so the removal interval can change the size of the font start. That is font-size:0, but the specific use of the corresponding adjustment, not necessarily a value of 0.
Whitespace causes horizontal spacing of elements in rows