我正在尝试使用您可以在此处找到的 bootswatch Bootstrap 模板:http://www.bootstrapcdn.com/#bootswatch_tab (模板是 Amelia)。
我是否只将其添加到我的 index.html 文档中:
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/amelia/bootstrap.min.css" rel="stylesheet">
或者我是否还需要添加这两个才能使其工作:
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
我想我只需要第一段代码,但我需要它来连接到我的 style.css 文档。
最佳答案
For Bootstrap, you need only these by default :
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
根据您要使用的主题,您必须通过源代码检查哪些其他外部文件已用于布局 (css
) 和可见效果 (.js
) 为它
通过 src 你会找到 amelia 的 url :
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/amelia/bootstrap.min.css" rel="stylesheet">
关于html - 我需要在 index.html 文件顶部使用多少 Bootstrap 链接才能使用模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24321155/