Summary of small issues with CSS applications and summary of CSS application issues
1. when two elements are written in line breaks, an interval is displayed in the actual layout. (This interval is usually because the parsing automatically defaults to a space character when the code is changed ), so in actual applications, if you want to place the two elements in a completely seamless display side by side, pay attention to the use of floating and positioning, alternatively, you can set the font-size: 0; of the parent element;
2. When absolute or fixed positioning is used, the elements will be removed from the document stream. The elements will be displayed above the document layer, which may cause other elements to be blocked and cannot be displayed normally. In this case, you need to set the z-index to set the level of the elements that are separated from the document stream to achieve the display effect;
3. In many cases, we subconsciously set the value of the border of the element to display the outer frame line. Although this is correct, but in a fixed-size container, and the size of the elements to be displayed is just right, you need to set outline to replace border. (Outline can only be set with four sides at the same time, while border can set the attributes of a single side, which should be set as needed ).