码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap学习笔记

时间:2015-11-17 21:53:06      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:

Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.

技术分享
 1 <!DOCTYPE html>
 2 <html lang="en">
 3   <head>
 4     <meta charset="utf-8">
 5     <meta http-equiv="X-UA-Compatible" content="IE=edge">
 6     <meta name="viewport" content="width=device-width, initial-scale=1">
 7     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
 8     <title>Bootstrap 101 Template</title>
 9 
10     <!-- Bootstrap -->
11     <link href="css/bootstrap.min.css" rel="stylesheet">
12 
13     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
14     <!-- WARNING: Respond.js doesn‘t work if you view the page via file:// -->
15     <!--[if lt IE 9]>
16       <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
17       <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
18     <![endif]-->
19   </head>
20   <body>
21     <h1>Hello, world!</h1>
22 
23     <!-- jQuery (necessary for Bootstrap‘s JavaScript plugins) -->
24     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
25     <!-- Include all compiled plugins (below), or include individual files as needed -->
26     <script src="js/bootstrap.min.js"></script>
27   </body>
28 </html>
View Code
 1 <style type=”text/css”>
 2 .row {
 3   margin-right: -15px;
 4   margin-left: -15px;
 5 }
 6 .container {
 7   padding-right: 15px;
 8   padding-left: 15px;
 9   margin-right: auto;
10   margin-left: auto;
11 }
12 </style>

Media queries:

 1 /* Extra small devices (phones, less than 768px) */
 2 /* No media query since this is the default in Bootstrap */
 3 
 4 /* Small devices (tablets, 768px and up) */
 5 @media (min-width: @screen-sm-min) { ... }
 6 
 7 /* Medium devices (desktops, 992px and up) */
 8 @media (min-width: @screen-md-min) { ... }
 9  
10 /* Large devices (large desktops, 1200px and up) */
11 @media (min-width: @screen-lg-min) { ... }

 

 

Extra small devicesPhones (<768px)

Small devices Tablets (≥768px)

Medium devicesDesktops (≥992px)

Large devices Desktops (≥1200px)

Grid behavior

Horizontal at all times

Collapsed to start, horizontal above breakpoints

Container width

None (auto)

750px

970px

1170px

Class prefix

.col-xs-

.col-sm-

.col-md-

.col-lg-

Bootstrap学习笔记

标签:

原文地址:http://www.cnblogs.com/hzj680539/p/4972877.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!