Bootstrap引入核心文件
一、cdn引入(不必下载)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--声明文档兼容模式,表示使用IE浏览器的最新模式-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--Responsive layout:响应式布局-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>蜗壳</title>
<!-- 引入Bootstrap核心样式文件 -->
<link href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- 引入jQuery核心js文件 -->
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- 引入BootStrap核心js文件 -->
<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
二、本地引入(注意路径)
目录结构为:(bootstrap本地文件在下图bootstrap文件夹下,可从官网下载)
home.html文件如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--声明文档兼容模式,表示使用IE浏览器的最新模式-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--Responsive layout:响应式布局-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>蜗壳</title>
<!-- 引入Bootstrap核心样式文件 -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- 引入jQuery核心js文件 -->
<script src="bootstrap/js/jquery-1.11.0.min.js"></script>
<!-- 引入BootStrap核心js文件 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>