【发布时间】:2016-09-26 07:10:12
【问题描述】:
我一直在努力将 Bootstrap CSS 文件包含到我的文件中。我的代码sn-p如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-
1">
<link rel="stylesheet"
href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" type="text/css"> <!--Works fine now, but not with local path -->
<title>Welcome</title>
</head>
<body>
<section>
<div class="jumbotron">
<div class="container">
<h1> Hello </h1>
<p> world </p>
</div>
</div>
</section>
</body>
</html>
这很好用,并且 Bootstrap 显示得很好。但是,我希望包含本地化文件。当我将代码头部的 link 更改为 <link rel="stylesheet" href="resources/bootstrap.css" type="text/css"> 时,引导程序消失。
只是为了确保并说服您 bootstrap.css 确实存在于 resources/bootstrap.css 我在代码顶部添加了 <%@ include file="/resources/bootstrap.css"%> 并它实际上向我展示了文件的全部内容。
我错过了什么?我该如何解决这个问题?
【问题讨论】:
-
PS:NONE 关于 SO 的现有答案对我有帮助。有几个问题询问同一件事,但没有一个有效。
标签: html twitter-bootstrap jsp spring-mvc