Boostrap响应式与非响应式

非响应式布局


  在使用非响应式布局时,在<head>标签中需要加入一下内容,其中最主要的是non-responsive.css文件

 1 <head>
 2         <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
 3        
 4         <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
 5         
 6         <!-- The above 2 meta tags *must* come first
 7         in the head; any other head content must come *after* these tags --> 
 8         
 9         <!-- Note there  is no responsive meta tag here -->
10         <link rel="icon" href="http://v3.bootcss.com/favicon.ico">
11         <title>Non-responsive Template for Bootstrap</title>
12         
13         <!-- Bootstrap core CSS -->
14         <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
15 
16         <!-- Custom styles for this    template -->
17         <link href="http://v3.bootcss.com/examples/non-responsive/non-responsive.css" rel="stylesheet">
18 
19         <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
20         <!--[if lt IE 9]>
21             <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
22             <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
23         <![endif]-->
24 </head>

响应式布局


  在使用响应式布局时,在<head>标签中只需要加入 <meta name="viewport" content="width=device-width, initial-scale=1"> 

  其<head></head>标签中的内容是这样的

 1 <head>
 2         <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
 3        
 4         <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
 5         
 6         <!-- The above 2 meta  tags *must*  come first
 7         in the head; any other head content must come *after* these tags --> 
 8         
 9         <!-- Note there is no responsive meta tag here -->
10         <link rel="icon" href="http://v3.bootcss.com/favicon.ico">
11         <title>responsive Template for Bootstrap</title>
12         
13         <!-- Bootstrap core CSS -->
14         <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
15         <meta name="viewport" content="width=device-width, initial-scale=1">
16 
17         <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
18         <!--[if lt IE 9]>
19             <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
20             <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
21         <![endif]-->
22     </head>

 

 

 

转载于:https://www.cnblogs.com/xidongyu/p/5370096.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值