soh*_*tel 5 css bootstrap-4 angular
我正在开发 angular 应用程序,在运行该应用程序时它没有显示任何错误,但我在许多 css 文件中收到了这种警告。
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning
(114:1) @import must precede all other statements (besides @charset)
Run Code Online (Sandbox Code Playgroud)
我在 114 线上导入的是这个。
@import url(http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
Run Code Online (Sandbox Code Playgroud)
我曾经在所有显示此类警告的 css 中像这样导入。
有什么解决办法吗?
小智 5
我想通过两个屏幕截图来解释它为什么会发出警告。因为您没有在第一行使用@import ....line 。
请参阅此屏幕截图,它发出警告。

见下面的截图这是解决方案:
警告已经消失,因为我在 style.css 文件的第一行使用了 @import ... 行。
| 归档时间: |
|
| 查看次数: |
6028 次 |
| 最近记录: |