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!