Code amount_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:19:03
Original
1005 people have browsed it

In terms of CSS, for example, two rectangular boxes, the width and height are the same, except for the background color. I merge the width and height codes of the two boxes into a common part of the CSS code, and handle the remaining background color separately. ,

In addition to reducing the amount of code, what other benefits does this have!


Reply to discussion (solution)

Easy to maintain. If you want to change the width and height in the future, you only need to change one place. If you haven't separated, then you have to change a lot of things.

By the way, this is related to the optimization of css code. Correct answer upstairs.

Improve the readability of CSS files and reduce the size of CSS files, which can relatively speed up the browser loading speed.
These are all about CSS optimization.

Related labels:
source:php.cn
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