Javascript 在css文件中的vscode上显示{预期的css(css lcurlyexpected)时出错 consturl='1〕https://api.openweathermap.org/data/2.5/weather'; 常量API_键='F33A484CF794D0148764789AABA32';

Javascript 在css文件中的vscode上显示{预期的css(css lcurlyexpected)时出错 consturl='1〕https://api.openweathermap.org/data/2.5/weather'; 常量API_键='F33A484CF794D0148764789AABA32';,javascript,css,progressive-web-apps,Javascript,Css,Progressive Web Apps,我在CSS文件中遇到了同样的问题,也就是说: “{ExpectedSCS(css lcurlyexpected)” 我的CSS文件包含以下代码: @导入“@angular/material/prebuild themes/strongurstrongle green.css” 然后我研究并发现CSS文件不能识别“字符”,我用“字符”替换了“字符”,这一切都开始起作用了 这解决了我的问题。希望这对您也有帮助。顺便说一句,错误在CSS文件中-您没有显示CSS文件file@Avinash德维维迪,你是

我在CSS文件中遇到了同样的问题,也就是说: “{ExpectedSCS(css lcurlyexpected)”

我的CSS文件包含以下代码: @导入“@angular/material/prebuild themes/strongurstrongle green.css”

然后我研究并发现CSS文件不能识别“字符”,我用“字符”替换了“字符”,这一切都开始起作用了


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

顺便说一句,错误在CSS文件中-您没有显示CSS文件file@Avinash德维维迪,你是怎么解决的?
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} />