所以我正在做一个使用bootstrap的项目。我的文件在htdoc>DocumentRepository中
<link rel ="stylesheet" href ="C:\xampp\htdocs\DocumentRepository\Bootstrap\bootstrap-3.3.5-dist\css\bootstrap.min.css">
<link rel ="stylesheet" href ="C:\xampp\htdocs\DocumentRepository\Bootstrap\bootstrap-3.3.5-dist\css\bootstrap-theme.min.css">
但问题是在本地主机上运行它不包括任何引导程序。请帮帮我!
发布于 2015-09-24 01:50:54
我猜你的页面应该是这样的。
<link rel ="stylesheet" href ="css/bootstrap.min.css" type="text/css">
<link rel ="stylesheet" href ="css/bootstrap-theme.min.css" type="text/css">将所有解压出来的文件保存在CSS目录中。
您也可以使用CDN。
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>发布于 2016-11-05 15:02:15
不需要使用或不需要包含来自根驱动器的文件,如您的链接。
href ="C:\xampp\htdocs\DocumentRepository\Bootstrap\bootstrap-3.3.5-dist\css\bootstrap.min.css"首先,在htdocs文件夹中创建一个主项目文件夹,如下所示:Bootstrap Directory style in Htdocs
则您的文件夹将位于Inside Project Folder 中
然后在inde.html 或 index.php中添加如下样式的链接
<link ytpe="text/css" rel="stylesheeet" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/bootstrap.min.js"></script>如果其他东西都是完美的,那么代码就会完美地运行。
发布于 2017-07-30 17:45:46
http://localhost/2017/bootstrap.min.css
如果你的bootstrap或者任何css或者jquery文件都放在css文件夹里,那么你必须先写http://localhost/,然后写文件夹的名称,如果你有这个文件夹,则直接写文件名,然后写扩展名。
https://stackoverflow.com/questions/32746192
复制相似问题