欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 幼教 > 【Django】开源前端库bootstrap,常用

【Django】开源前端库bootstrap,常用

2024/10/25 1:30:28 来源:https://blog.csdn.net/xzzteach/article/details/140729958  浏览:    关键词:【Django】开源前端库bootstrap,常用

文章目录

    • 下载bootstrap源文件到本地项目
    • 引入bootstrap文件

在这里插入图片描述

  • 官网:https://www.bootcss.com/
  • V4版本入口:https://v4.bootcss.com/
  • V5版本入口:https://v5.bootcss.com/

这里使用成熟的V4版本,中文文档地址:https://v4.bootcss.com/docs/getting-started/introduction/

下载bootstrap源文件到本地项目

在这里插入图片描述
https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css
https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js
以上链接打开后,文件另存为即可
在这里插入图片描述

引入bootstrap文件

<!doctype html>
<html lang="zh-CN"><head><!-- 必须的 meta 标签 --><meta charset="utf-8"><meta name="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><!-- Bootstrap 的 CSS 文件 --><link rel="stylesheet" href="./static/antapp/bootstrap/bootstrap.min.css"><title>Hello, world!</title></head><body><h1>Hello, world!</h1><table class="table"><thead class="thead-dark"><tr><th scope="col">#</th><th scope="col">First</th><th scope="col">Last</th><th scope="col">Handle</th></tr></thead><tbody><tr><th scope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><th scope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><th scope="row">3</th><td>Larry</td><td>the Bird</td><td>@twitter</td></tr></tbody></table><!-- JavaScript 文件是可选的。从以下两种建议中选择一个即可! --><!-- 选项 1:jQuery 和 Bootstrap 集成包(集成了 Popper) --><script src="./static/antapp/bootstrap/jquery.min.js"></script><script src="./static/antapp/bootstrap/bootstrap.bundle.min.js"></script></body>
</html>

在这里插入图片描述
中文文档地址:https://v4.bootcss.com/docs/getting-started/introduction/

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com