【问题标题】:Error showing { expected css(css-lcurlyexpected) on vscode in CSS file [closed]在 CSS 文件中的 vscode 上显示 { 预期 css(css-lcurlyexpected) 时出错 [关闭]
【发布时间】:2020-10-19 05:47:06
【问题描述】:
const URL = 'https://api.openweathermap.org/data/2.5/weather';
const API_KEY = 'f33a484cf794d08d0148764789aaba32';


<img className="city-icon" src={`https://openweathermap.org/img/wn/${weather.weather[0].icon}@2x.png`} alt={weather.weather[0].description} />

【问题讨论】:

  • 顺便说一句,错误出在 CSS 文件中 - 你没有显示 CSS 文件
  • @Avinash Dwivedi,你是怎么解决这个问题的?
  • 这是 React 吗?

标签: javascript css progressive-web-apps


【解决方案1】:

我在我的 CSS 文件中遇到了同样的问题,说的是一样的: "{ 预期scss(css-lcurlyexpected)"

我的 CSS 文件包含以下代码: @import ‘@angular/material/prebuilt-themes/strongurstrongle-green.css’

然后我研究并认识到CSS文件无法识别'字符。我用 ' 字符替换了 ' 字符,一切都开始工作了。

这解决了我的问题。希望这对您也有帮助。

【讨论】:

    猜你喜欢
    • 2023-01-20
    • 1970-01-01
    • 2017-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多