CSS optimization for improved performance

Source: Internet
Author: User

CSS optimization is mainly four aspects:
    1. Load performance
      For example, do not use @import and so on, @import will affect the loading speed of CSS files, considering the load performance, mainly from reducing the file volume, reduce blocking loading, improve concurrency, any hint can not escape these several big directions.
    2. Selector performance
      The effect of selector on the overall performance now can be ignored, selector is more standardization and maintainability, robustness, few people in the actual work will be the selector performance as a focus on the object, but know better than not know, (reasonable selection of selectors, There is no need to use the ID selector in case of minimal use).
    3. Rendering performance
      Rendering performance is the most important object of interest for CSS optimization. Too much page rendering junky? See if you're using a lot of Text-shadow? is the font anti-aliasing open? How is CSS animation implemented? (for some complex, seemingly cool, meaningless animated effects, consider chopping and not writing), using GPU acceleration wisely (use cache for rendering).
    4. Maintainability
      Is it reasonable to name? Is the structure level design robust enough? (typically nesting does not exceed 5 layers), is the style reused? Elegant CSS will not only affect the later maintenance costs, but also the load performance and other aspects of impact.

CSS optimization for improved performance

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.