Bootstrap CDN and localized environment to build _javascript skills

Source: Internet
Author: User
Tags jquery library

First, build BOOTSTAP environment

Can use Bootstrap CDN service, in

<link href= "//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel= "stylesheet" >
<script src= " Cdn.bootcss.com/jquery/2.1.4/jquery.min.js "></script>
<script src="//cdn.bootcss.com/ Bootstrap/3.3.5/js/bootstrap.min.js "></script>

This order cannot be changed, because Bootstrap.min.js needs to invoke the jquery library, so jquery.min.js to precede it.

Second, localization BOOTSTAP environment

Sometimes the network is a bit of a card, refresh the page slow, affect the Web development mode, to solve this problem of the small impatient of the way to localize these libraries. The order of the above should also be maintained when localizing.

(1) jquery library, downloaded directly from the official website, placed in a directory, such as: the jquery folder stored in the project example, then

 
 

Can

(2) The bootstrap framework is relatively complex; Because to invoke the buttons provided by bootstrap itself, it can cause problems if only bootstrap.min.css and Bootstrap.min.js are available. For example, when you add a button to your code, there is nothing in the Web page that excludes errors such as mistakes. Calling the bootstrap button in a Web page requires additional resource files, which can be used only if you add them all. For example, call the button, you need to download the bootstrap, and then find the Dict folder, all the folders inside (there will be css,js,fonts) copy to the project example new Folder Boostrap. When you need to use a button, the system automatically establishment the relative path to collect the desired content.

PS: If other calls, copy the entire folder into the project and add an external access.

(iii) Localization of additional external resources

For example, I would like to use Fondawesome (official website, Chinese network) some resources, in addition to the most concise way BOOTSTRAPCDN

< link href= "//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel= "stylesheet" >

Outside

Localization:

Copy the entire Font-awesome folder into your project.

Refer to Font-awesome.min.css in the HTML.

<link rel= "stylesheet" href= "Path/to/font-awesome/css/font-awesome.min.css" >

The above is a small set to introduce the bootstrap CDN and localization environment to build, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.