我不能 link css 文件到 html 在 eclipse 上不工作

I can't link css files to html is not working on eclipse

我从网上下载了一些 css 模板,复制了包含 css 文件的文件夹并将它们粘贴到我的项目中,我也使用了他们的 html 代码以便测试服务器上的页面。它只是行不通,我完成了互联网上的所有步骤,从 link css 到 html。

css 文件夹在 WEB-INF 中,jsp 页面在网页内容中,我还不能 post 站点上的图像所以我希望你可以想象结构。

<link rel="stylesheet" href="/WEB-INF/css/animate.css" type = "text/css"/>

这是我使用的从 whosebug.com 复制的 link 语法,即使我在路径中包含项目名称,它仍然不起作用。

文件夹结构有错吗?或具有 link 语法的内容 ?

感谢任何帮助

改变

 href="/WEB-INF/css/animate.css" 

 href="/css/animate.css" 

你不需要写那个...css,页面和图像通常放在 webcontent 文件夹中(根据惯例)。

我认为你只需要简单一点,link 你的 css 就像这样:

这项工作在 HTML、PHP

<link rel="stylesheet" type="text/css" href="css/animate.css" />

这是给 ASP.NET

<link rel="stylesheet" type="text/css" runat="server" href="css/animate.css" />

希望对您有所帮助!