Introduction to css optimization strategies

王林
Release: 2020-07-09 17:24:13
forward
2294 people have browsed it

Introduction to css optimization strategies

Methods to optimize css and improve performance:

(Recommended tutorial: css Quick Start)

  • Avoid over-constraints

  • Avoid descendant selectors

  • Avoid chain selectors

  • Use compact syntax

  • Avoid unnecessary namespaces

  • Avoid unnecessary duplication

  • It is best to use semantic names. A good class name should describe what it is, not something like

  • Avoid! important, you can choose other selectors

  • to streamline the rules as much as possible. You can merge repeated rules in different categories

The above is the detailed content of Introduction to css optimization strategies. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template