【发布时间】:2013-12-12 11:46:47
【问题描述】:
大家好,我正在使用 php 和 MAMP。
显然 bootstrap 没有出现在我的基本 PHP 应用程序中。我有 index.php 文件。
这是我的代码:
<!DOCTYPE html>
<html>
<head>
<title>Summit</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<h1>Summit</h1>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
</body>
</html>
我的 htdocs 文件夹中有 bootstrap.js、bootstrap.css 和 index.php(包含上面的代码),这似乎是使用 MAMP 的默认目录。
【问题讨论】:
-
不工作是什么意思?
-
为什么你的脚本不在你的 head 标签中?将它移到那里开始,然后检查控制台并确保文件位于正确的位置
-
什么不起作用?你有什么错误吗?
-
把脚本标签放到你的脑袋里,这样应该就可以了。
-
天哪,我有一个错误,bootstrap 似乎在家工作:/
标签: php css twitter-bootstrap