所以我在Golang寫了一個web應用程序。該html引用了css
文件,如下所示:<link href="/css/index.css"...
,但從未找到css
文件!轉:HTML找不到css文件
雖然這裏是無賴,我有幾個css
文件,他們都在同一個文件夾,他們都工作!
如果我創建另一個css
文件並將它命名爲index2.css
和index.css
的內容複製到index2.css
,這個完美的作品,但由於某些原因,這個名字index.css
不起作用!
另外,當我去鏈接http://localhost:8080/css/
此列表中我所有的css
文件。如果我點擊它們中的任何一個,它將完美地打開,除了index.css
;我沒有找到404。
這真的很奇怪,任何想法可能是什麼問題?
在css文件夾中的所有文件:
index.css未發現:
<head>
<title>Title</title>
<link href="/css/index2.css" rel="stylesheet" type="text/css" media="screen"/>
<link rel="icon" type="image/png" href="/images/img.png"/>
<script src="/scripts/jquery.min.js"></script>
<script src="/scripts/scroll.js"></script>
</head>
當我想<link href="/css/index2.css" rel="stylesheet"...
我可以看到在CSS樣式我頁。當我鏈接到<link href="/css/index.css" rel="stylesheet"...
我不能。
index.css存在我的文件夾中:
編輯
它現在。我認爲這是一個許可問題。我刪除了舊的index.css
並創建了一個新的並且現在可以工作。謝謝您的幫助。
您必須顯示的代碼。 – Volker
沒有代碼源很難回答。 – LeMoussel
對不起。該代碼只是純HTML,並不認爲它會有用。但我剛剛上傳了一些代碼以及一些圖片 – SomeGuyFortune