問題描述
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”