在IDEA导入了其它HTML文件却没有正确配置
今天用复制了一个教程里的example.html文件到项目里
直接用浏览器打开
报错:
Page ‘http://localhost:63343/M…s/bootstrap-theme.min.css’ requested without
解决方法
<!DOCTYPE html>
<html>
<head>
<meta name="author" content="Yeeku.H.Lee(CrazyIt.org)" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Bootstrap模板 </title>
<link rel="stylesheet" href="./css/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="./css/bootstrap/bootstrap-theme.min.css">
</head>
<body>
<!-- panel、panel-danger是Bootstrap提供的CSS样式 -->
<div class='panel panel-danger'>Bootstrp</div>
<script type="text/javascript" src="./js/bootstrap/jquery-3.1.1.js"></script>
<script type="text/javascript" src="./js/bootstrap/bootstrap.min.js"></script>
</body>
</html>
如图所示:先把需要的js、css文件放到web目录下
html中引用路径如下:<link rel="stylesheet" href="./css/bootstrap/bootstrap.min.css">
./是指你的html文件的同一级
…/是指你的html文件的上一级
可根据自己实际情况修改!(若无对应的css/js文件,那只好删掉了)
新人第一篇博客~给自己加油打气!
如有错误,还请多多指教!
转载或者引用本文内容请注明来源及原作者:橘足轻重