Bootstrap _ first use and bootstrap first use

Source: Internet
Author: User

Bootstrap _ first use and bootstrap first use

Use Bootstrap in Web pages

We have created a simple basic template.

<!DOCTYPE html>

1. First, we can reference the Bootstrap style file to the webpage.

<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

2. if you need to use the Bootstrap architecture to provide JavaScript plug-ins, You need to reference the js file links of the architecture to the webpage. As mentioned above, JavaScript plug-ins are dependent on the jQuery library, therefore, we also need to reference the library file of jquery.

<script src="js/jquery-2.0.3.js"></script><script src="js/bootstrap.min.js"></script>

3. The viewport label, which can be modified to display on most mobile devices, to ensure proper drawing and touch screen scaling.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
4. Some new html5 labels we use. Therefore, browsers below IE9 do not support these labels or add styles for these labels. To fix this problem, we need to link the referenced files as follows:

<!--[if lt IE 9]>    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script><![endif]-->

This means that if your IE browser version is earlier than IE9, the two js file libraries will be loaded. Now you can use these new labels and add styles to these labels.

In this way, our simplest Hello World! The page is displayed in front of everyone.

Summary

We have also enabled responsive layout. Of course, some websites may not need a responsive layout. We need to manually disable this layout, which is described in detail in this document.




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.