In the previous article, I introduced the basic knowledge of Bootstrap to you. Next, I will introduce it to you through this article.
We can download bootstrap files at http://getbootstrap.com
Click on the download bootstrap on the left to download the compiled version of bootstrap's css, javascript and font library. Click the download source in the middle to download bootstrap. Generally speaking, we can use bootstrap to click on the compiled version on the left to download it.
If the compiled version is downloaded, the structure is:
If the downloaded source code structure is:
The contents in the Dist folder are the same as those in the compiled version.
If you need to use bootstrap, the front-end framework, you need to set some formatting and introduce some files. Here is a basic template for using Bootstrap.
Bootstrap uses some HTML5 elements and CSS properties. For these to work properly, you need to use HTML5 document type (Doctype). Therefore, the following code snippet is included at the beginning of the page:
In order to make the IE6, 7, 8 versions (IE9 or below) browsers compatible with the newly added tags of html5, the bootstrap template can be introduced:
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
Similarly, in order to make IE6, 7, and 8 browsers compatible with css3 styles, the following code is introduced
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
The following code tells IE browser that IE8/9 and later versions will render the page with the highest version of IE
<meta http-equiv="X-UA-Compatible" content="IE=edge">The following code allows the browser to display the corresponding page in the most appropriate size: <meta name="viewport" content="width=device-width, initial-scale=1">
To use bootstrap to build a web page, you need to introduce bootstrap's css file.
<link href="~/bootstrap-3.2.0-dist/css/bootstrap.min.css" rel="stylesheet" />
To use the javascript component in bootstrap, you also need to introduce the js plugin of bootstrap. Because the js plugin is based on jquery, you must first introduce the jquery script. Note that the jquery script needs to be placed in front of the js plugin of bootstrap.
<script src="~/bootstrap-3.2.0-dist/js/jquery.min.js"></script> <script src="~/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
The above is the full description of the second Bootstrap start-up introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!