Bootstrap引入核心文件(即搭建一个Bootstrap框架)

博客介绍了Bootstrap引入核心文件的方法,包括cdn引入(无需下载)和本地引入(需注意路径),还提及可从官网下载本地文件,给出了目录结构示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值