In html, how does one remove spaces to solve the white space on the browser ?, Remove white space
Today, I encountered a compatibility problem during graph cutting. I was lucky to finally solve this problem through the article by instructor Zhang Jinxin! However, when I was reading instructor Zhang's article, I couldn't understand what I wanted. I couldn't find the answer I wanted after I checked it online. Later I thought about it for a long time, now I want to write down my ideas. If something is wrong, you must point it out.
(Example 1 ):
This is an example code in instructor Zhang's article. The structure of the Code is that a div contains three a elements, each of which occupies one line. Therefore, when displayed on a browser, there is a gap between elements,
So there is a problem! Change the Code as follows (Example 2 ):
The final result is as follows,
The spacing between elements a disappears! Why do some minor changes in the Code produce different results? This puts me in a deep sense of thinking ...... @-@!
I understand this as follows: In the code in Example 1, the spacing between element a and element a is the distance between the element and the element, and the browser displays a blank space, the reason for the white margin between elements is the space between the tag segments. Therefore, remove the spaces in HTML and the natural spacing is fixed." Convert the perspective to Example 2. In the image, see the following:
There is a blank part between the code and the code, but the blank part is the distance between the element and the content (Element a and its content) it is not the white space between elements mentioned in the article by Mr. Zhang. Therefore, the white space will not be displayed in the browser. So? Some minor changes in the Code may help you solve big problems! In the above example, the spacing between elements and content is changed to the spacing between elements and content, which helps me solve the compatibility problem!
The above is what I learned today. Of course, my understanding may be wrong, but if you have different ideas, you must come up with them! Comments ~