Css3 vs css2 major PK

Source: Internet
Author: User

The author of this article compares css2 and css3 by making the same page. Let's see who is better.
Css3 has been available for a long time and is still in the development and improvement stage. However, the introduction, usage, and praise of css3 on the Internet have become increasingly popular, and the introduction of css3 on site building is also rare. Is css3 really better than css2? What are the advantages?
This article draws onArticle(For the original article, you can view the link at the bottom of the article), and analyze the difference between CSS 3 and CSS from the perspective of css3 compiling and working principle.
The author uses a self-made page as an example to use CSS and css3 respectively? The two versions create the same page, so that the two pages have almost the same effect, and then compare the two CSS files.

 

Production Time
First, I made a comparison on the production time. Using css3 to create a page is far less time-saving than using CSS. Because css3 can directly make a lot of effects to replace images, and pages created using the old CSS version need to make some images to reflect the effects, it takes a lot of time to make images.

File quantity, capacity, and loading time
Secondly, the author compares the file size and loading time, as shown in section 1.
The size of CSS files in css3 is 5.2 K, the total number of webpage files is 12, and the total size is 767.9 K. The CSS files in CSS version are 4.5 K, but the total number of webpage files is 22, the webpage capacity is 849.2 kb. The loading time is 3.3 seconds and 4.7 seconds respectively.
As shown in the preceding figure, css3 is much simpler and faster than CSS.

Server requests
Another metric is the number of server requests. Generally, the number of requests to the server depends on the number of files in the webpage. Don't underestimate this indicator. Many Web page makers have discovered CSS sprite technology to reduce the server request load.
As shown in figure 2, there are 12 files in css3, and 22 files in CSS version, so their requests to the server are 12 and 22, respectively. CSS 3 again wins.
Finally, based on the above data, css3 and CSS-related data have been listed in figure 3. css3 wins.
In this case, we can see that css3 has more advantages in addition to its beautiful effects. After all, it is a product of the development of network technology and will inevitably develop in a more simple, practical, and beautiful direction.

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.