Bootstrap "slimming" optimization strategy-PHP development

Source: Internet
Author: User
In the previous example, we used Bootstrap to quickly and easily deploy a site. The more people are capable, the greater their responsibilities. Bootstrap is very powerful and bulky, which has a slight impact on Webpage loading, there is no perfect thing in the world, and we cannot blame Bootstrap. What we need to do is to optimize Bootstrap as much as possible. How to optimize the volume of Bootstrap? Let me talk about my experiences. In the previous example, we used Bootstrap to quickly and easily deploy a site. The more people are capable, the greater their responsibilities. Bootstrap is very powerful and bulky, which has a slight impact on Webpage loading, there is no perfect thing in the world, and we cannot blame Bootstrap. What we need to do is to optimize Bootstrap as much as possible.

How to optimize the volume of Bootstrap? Let me talk about my experiences.


How to use a bootstrap.css Style File for website production?

Bootstraphas two style files, bootstrap.cssand bootstrap.min.css, which have the same functions. Bootstrap.css style files are not compressed. Although the size is a bit large, the code is neat and easy to view. Although bootstrap.min.css is small in size, the source code can only be understood by machines. Bootstrap.css is preferred when designing the website for viewing the source code. Of course, you can also use bootstrap.min.css to view the document and quickly complete website creation. With such a result, you can only be a layman of bootstrap. You may not be happy with the essence of bootstrap. Refer to its source code to see how it is implemented.

Bootstrap.css, which must be viewed in the document and cannot be missed in the source code.


How to optimize the bootstrap.css Style File

Upload to your server. It is worth noting that the Bootstrap Chinese network has built its own free CDN acceleration service for Bootstrap. Based on CDN services provided by cloud vendors in China, the Service provides faster access speeds, more obvious acceleration effects, no speed and bandwidth restrictions, and is permanently free of charge. The Bootstrap Chinese network also provides CDN acceleration services for a large number of open-source front-end tool libraries.

In this way, we have another option. You can simply put the following link on your webpage.

 
 
 
 
 

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.