2013-03-18 60 views
0

我有以下文件夾projectCss和裏面我有文件夾languageReference,* CSS *和JS .Inside的CSS文件夾我有文件style.cssCSS路徑

裏面的languageReference我有三個文件夾,即I幀,* 文檔 *和cssFiles .Inside I幀的文件夾,我有文件夾codeSampleshtmlFiles .Inside的htmlFiles文件夾,我有一個名爲index.html的html文件。

我的項目設置看起來像這樣可視化。

projectCss 

    *css - style.css 
    *langugeReference 
      *docs 
      *cssFiles 
      *iframes 
       *codeSamples 
       *htmlFiles 
        *index.html 

我試圖找出我的道路看起來怎麼樣,但沒有works.Can我得到,而不會導致到Web服務器上提供該頁面的路徑?

+0

你目前有什麼不起作用 – OJay 2013-03-18 10:26:56

+0

要清楚,你想要將'style.css'鏈接到'index.html'? – Bigood 2013-03-18 10:26:56

+0

文件的路徑? '沒有用。'請嘗試什麼? – 2013-03-18 10:27:07

回答

5

由於Charlie在評論中說,你需要去「上」三個文件夾(../../../),然後選擇文件夾和文件,像這樣:

<link href="../../../css/style.css" ... /> 

或者,您可以從「根」走,假設你的佈局是根,下面將工作太:

<link href="/css/style.css" ... /> 
2

使用相對路徑:

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