-1

编译失败。

错误 :

./src/app/shopping-list/shopping-edit/shopping-edit.component.css 模块错误(来自 ./node_modules/postcss-loader/src/index.js):(发出值而不是错误实例) CssSyntaxError: D:\demoApp\src\app\shopping-list\shopping-edit\shopping-edit.component.css:98:26: Can't resolve 'assets/header.png' in 'D:\demoApp\src \app\购物清单\购物编辑'

代码 :

   96 | }
   97 | .section-testimonials{
>  98 |     background-image:url(assets/header.png); ;
      |                          ^
   99 | }
  100 | 
4

1 回答 1

1

在该位置使用引号和正斜杠:

   96 | }
   97 | .section-testimonials{
>  98 |     background-image:url("./assets/header.png"); ;
      |                          
   99 | }
  100 | 
于 2020-03-09T08:38:17.317 回答