Webstorm Meteor CSS 背景圖像位置 (Webstorm Meteor CSS Background Image Locations)


問題描述

Webstorm Meteor CSS 背景圖像位置 (Webstorm Meteor CSS Background Image Locations)

到目前為止,我對 Meteor 很熟悉並且很喜歡它。我選擇的 IDE 是 Webstorm (PHPStorm),我遇到了一個煩惱,我想知道是否有人有解決方案。

Meteor 在從 /public 提供文件時基本上實現了魔法 目錄,您可以在提供圖像時將其關閉,例如在這種情況下,圖像。所以讓我們想像一下我有這個結構:

‑ public
  ‑ images
    ‑ test.png

我的 CSS 文件中有這個規則:

.some‑class{
  background: url('/images/test.png') no‑repeat center center;
}

當然 Meteor 可以很好地顯示圖像,但 Webstorm 將其視為丟失的文件在 CSS 文件中引發錯誤。(Webstorm 會期望 /public/images/test.png)。


參考解法

方法 1:

This is software question but your solution is:

Settings ‑> editor ‑> inspections then on right panel select css ‑> invalid element ‑> uncheck unknown file or directory 

Edited after comment:

Webstorm: “Cannot Resolve Directory”

(by webkennyAlex)

參考文件

  1. Webstorm Meteor CSS Background Image Locations (CC BY‑SA 2.5/3.0/4.0)

#webstorm #meteor






相關問題

找到 SASS 可執行文件的位置。(使用 rbenv) (Find the location of the SASS executable. (using rbenv))

如何在 webstorm 中使用 angular js (How to use angular js with webstorm)

Node 的 WebStorm 代碼完成顯示太多選項 (WebStorm code completion for Node shows too many options)

Webstorm JSX emmet 擴展 (Webstorm JSX emmet expansion)

無法在 node_modules (WebStorm) 中設置斷點 (Unable to set breakpoints inside node_modules (WebStorm))

Webstorm Meteor CSS 背景圖像位置 (Webstorm Meteor CSS Background Image Locations)

Webstorm 11 顯示有效代碼的編譯時打字稿錯誤 (Webstorm 11 shows compile-time typescript error for valid code)

WebStorm 和 TypeScript:如何導航到包的 JS 源文件? (WebStorm and TypeScript: how to navigate to JS source file of a package?)

有沒有辦法使用 WebStorm 中的調試器單步執行 RunJS 應用程序 (Is there a way to step through a RunJS app using the debugger in WebStorm)

IntelijIDEA (Goland) 使用 /private/var/folders/ (IntelijIDEA (Goland) uses /private/var/folders/)

無法將 WSL 節點解釋器添加到 WebStorm (Can't add WSL Node Interpreter to WebStorm)

禁止在 Nrwl Nx 的同一庫中導入桶文件 (Disallow barrel file imports within the same library in Nrwl Nx)







留言討論