【问题标题】:Image not adding to pug file图像未添加到 pug 文件
【发布时间】:2021-10-18 15:07:21
【问题描述】:

我正在向 home.pug 添加图像。在 localhost 上打开 home.pug 时,图像不会显示在浏览器上。我该如何解决?

div.banner
     img(src="/img/p1.png")

enter image description here

【问题讨论】:

    标签: image web pug


    【解决方案1】:

    您的static 目录是如何导出的?

    您可能必须使用:

    div.banner
         img(src="/static/img/p1.png")
    

    【讨论】:

      猜你喜欢
      • 2017-06-28
      • 2012-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多