Summary of small issues with CSS applications and summary of CSS application issues

Source: Internet
Author: User

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 ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.