【发布时间】:2018-01-05 07:56:00
【问题描述】:
我有一个 index.html 文件和 index.css。目录结构为: img of directory structure
我将 css 链接到 html 与:link rel="stylesheet" type="text.css" href="css/index.css"
我正在使用 tomcat v8.5 来托管。当我在服务器上运行我的项目时,我在 eclipse 的窗口中看到了这个: browser displayed within eclipse
但是,当我打开 chrome/firefox 并搜索时,它只是拉动 index.html 并且没有显示 css :(
我读到文件必须用“相对路径”指定,但是包含 index.css 的文件夹与 index.html 位于同一目录(WebContent)中。那么 href="css/index.css" 有什么问题呢?有人可以帮我解决路径问题吗?
非常感谢您的宝贵时间!
【问题讨论】:
标签: html css eclipse web directory