响应式:
我们需要在head标签中添加viewport的meta标签
<head>
<meta name="viewport" content="width=device-width, scale=1.0">
</head>
viewport的详解:https://www.cnblogs.com/pigtail/archive/2013/03/15/2961631.html
让浏览器用最新的引擎去渲染这个页面:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
引入bootstrap库到我们页面:
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css">
代码:
<!doctypoe html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport" content="width=device-width, scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
网友评论