Django引入Bootstrap框架

本文介绍了如何在Django项目中引入Bootstrap框架,提供了BootStrap的CDN链接和中文官方文档资源。同时,也讲解了如何引用jQuery,并给出了在线和本地文件引用jQuery的代码示例。

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

BootStrap

BootStrap的各版本链接地址:https://www.bootcdn.cn/twitter-bootstrap/
BootStrap中文官方文档:http://code.z01.com/v4/components/carousel.html
代码如下:

<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="http://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.css" rel="stylesheet" />
	</head>

	<body>
		
	</body>

</html>

在其中随便写一点东西,效果如下(可见是成功引入了Bootstrap框架):
在这里插入图片描述

jQuery

jQuery 所有版本在线引用 - JavaJobs - 优快云博客 https://blog.youkuaiyun.com/qq_40147863/article/details/83116859
在线引用jQuery的代码:

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

引用本地文件的BootStrap框架

<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet" />
<script src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值