html - 如何包含样式表
问题描述
我开始用 HTML 和 CSS 编程。我有这行非常简单的代码,我尝试添加引导程序,但我无法使按钮具有样式表添加的样式。
所以按钮没有向我显示其各自的样式,所以我想知道我做错了什么?
<html>
<head>
<script src="bootstrap.min.js"></script>
<title>Name of the website</title>
</head>
<body>
<p>This is an example of a paragraph.</p>
<p>¡Hello world!</p>
<button type="button" class="btn btn-danger">Danger daw!</button>
</body>
</html>
解决方案
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>Maybe this way the code can help you</h1>
<p>This is a example of paragrafh</p>
<p>!Hello world!</p>
</div>
</body>
</html>
推荐阅读
- excel - Visual Basic For Applications“下标超出范围”错误
- sql - 去掉sql中价格前面的$符号
- python - 如何使用 Python Docx 在表格中搜索特定文本并将图像添加到同一个表格中
- c# - 我可以以某种方式缩短这段代码吗?可以在这里使用 lambda 吗?
- kubernetes - k8s 是否会在 HPA 范围内扩展一个 pod 以驱逐它并满足中断预算?
- r - R - 使用 compare_df() 的输出更新原始数据框
- sql - 寻找有关我的 sql 查询的指导,该查询显然包含一个数组
- c - Xlib,如何使用C迭代地获取屏幕上的所有窗口
- excel - 在私有子中引用公共变量时遇到问题
- html - TCR官网-高清图片URL问题