Article 2. Start with Bootstrap and Article 2. bootstrap

Source: Internet
Author: User

Article 2. Start with Bootstrap and Article 2. bootstrap

Article 2 start of Bootstrap

We can download bootstrap files in the http://getbootstrap.com

 

 

Click download bootstrap on the left to download the compiled css, javascript, and library versions of bootstrap. Click download source in the middle to download the source code of bootstrap. In general, we can use bootstrap to download the compiled version on the left.

If the downloaded compiled version structure is:

 

 

If the downloaded source code structure is:

 

 

The content in the Dist folder is the same as that in the compiled version.

 

If you need to use the bootstrap front-end framework, you need to set some formats and introduce some files. Below is a basic template for using Bootstrap.

 

Bootstrap uses some HTML5 elements and CSS attributes. To make these operations work normally, you need to use the HTML5 document type (Doctype ). Therefore, the beginning of the page contains the following code segment:

 

 

To make IE6, 7, and 8 (earlier than IE9) browsers compatible with the tags added by html5. just introduce the following code file:

<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>

Similarly, to make IE6, 7, and 8 browsers compatible with the css3 style, introduce the following code:

<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>

The following code tells IE that IE8/9 and later versions will use the highest version IE to render the page

<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 webpage, You need to introduce the css file of bootstrap,

 

 
<link href="~/bootstrap-3.2.0-dist/css/bootstrap.min.css" rel="stylesheet" />
 
To use javascript components in bootstrap, you also need to introduce the js plug-in of bootstrap. Because the js plug-in is based on jquery, you must first introduce the jquery script, note that the jquery script must be placed in front of the js plug-in 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>

Related Article

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.