简体   繁体   English

HTML 图像和 PhpStorm

[英]HTML Image and PhpStorm

Cannot resolve file 'logo.png' - said the HTML无法解析文件“logo.png” - 表示 HTML

<img src="logo.png" alt="Logo" width="314" height="70">

The HTML keeps saying it can't find it, but it works. HTML 一直说找不到,但它可以工作。 Meanwhile, if I tell it that it's in public/logo.png, then its a broken image.同时,如果我告诉它它在 public/logo.png 中,那么它是一个损坏的图像。

If this is a feature, how can I turn off this markup.如果这是一项功能,我该如何关闭此标记。 If It works, I don't want to have warnings.如果它有效,我不想收到警告。 If it can be done better, tell me, I'll fix it and again - no markups like errors or sort of.如果它可以做得更好,请告诉我,我会一次又一次地修复它 - 没有错误之类的标记。

  • You must right-click on "public" directory in PHPStorm您必须右键单击 PHPStorm 中的“公共”目录
  • Select "Mark Directory as" -> "Resource Root" Select“将目录标记为”->“资源根”
  • Profit利润

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM