How to load and use the bootstrap framework on html pages?
This problem happened when I typed the code today.
I would like to share with you the solution:
1/7
Download from the official bootstrap website. For our developers, we can directly download the compiled and compressed CSS and JavaScript files. In addition, it also contains the font files, but does not contain the documents and source code files. Open the decompressed package and you will find three folders: css, fonts, and js. This is the most basic form of Bootstrap organization: uncompressed files can be directly used in any web project. We provide CSS and JS files compressed (bootstrap. min. *) and uncompressed (bootstrap. The font icon file is from Glyphicons.
2/7
All Bootstrap plug-ins depend on jQuery. In addition, we recommend that you use the compressed version in the official project. Because it is small in size, you can download jQuery support from the official website,
3/7
Put the downloaded jQuery file under the js directory in bootstrap,
4/7
Create a new demo.html file under the root directory of bootstrap. (note that you must create a new file under the root directory, because you need to link the css and js files in the bootstrap framework to the created demo in the subsequent steps)
5/7
Edit the demo.html file and add reference to css and js in the bootstrap framework. The content is as follows. The image is annotated. In this way, we have basically established the basic architecture for using the bootstrap framework.
6/7
In addition, bootstrap officially provides the link service, which is permanently free. Even if you do not download the bootstrap framework file locally, you can directly use it in html. Use the following code:
<Link href = "http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel = "stylesheet">
<Script src = "http://libs.baidu.com/jquery/2.0.0/jquery.min.js"> </script>
<Script src = "http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"> </script>