Some W3C CSS standards experience

Source: Internet
Author: User

Summarize some experiences related to W3C CSS standards:

I. Use less remedies. Similar to break-word, z-index, manual layering, vertical alignment, and so on, it is best to use less, because not all browsers support it and it is very difficult to pass W3C detection.

2. The center is not a float value. Many new users mistakenly think of the center value as a float value, but this is not the case. Center is only the value of text-align.

3. Alignment cannot contain two values. Many new users fill in two values in float or text-align, for example, float: left top. This is not allowed and cannot be identified by the browser.

4. Do not customize the color of the scroll bar. Many browsers cannot normally recognize the scroll bars of custom colors, and many custom colors cannot pass W3C.

5. Separate scroll bar settings. Currently, overflow-x (horizontal scroll bar) or overflow-y (vertical scroll bar) are often used. When this is set, it is often found that not all clients have an effect, it is best to set both the body and html when setting. However, CSS is not supported by CSS2.1 (CSS2.1 supports overflow and defines horizontal and vertical scroll bars at the same time). It is not supported by css3. Use as few as possible.

6. If the background and color are the same, a warning is triggered.

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.