我目前正在尝试集成 weather icons .但是,如果我嵌入所有内容并将其插入到我的 HTML 中,则不会显示任何图标。以下是我的文件夹结构和 index.html。
我的文件夹结构如下:
- CSS
- 天气图标-wind.min.css
- 字体
- weathericons-regular-webfont.eot
- weathericons-regular-webfont.svg
- weathericons-regular-webfont.ttf
- weathericons-regular-webfont.woff
- weathericons-regular-webfont.woff2
- index.html
index.html:
<!DOCTYPE html>
<html lang="de">
<head>
<title>weather</title>
<link rel="stylesheet" href="css/weather-icons-wind.min.css">
</head>
<body>
<h1>testgt</h1>
<i class="wi wi-day-sunny"></i>
</body>
最佳答案
您需要包含 weather-icons.css
文件而不是 weather-icons-wind.css
看到这里,它工作正常。
<!DOCTYPE html>
<html lang="de">
<head>
<title>weather</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/weather-icons/2.0.9/css/weather-icons.css">
</head>
<body>
<h1>testgt</h1>
<i class="wi wi-day-sunny"></i>
</body>
关于html - 如何显示天气图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53791371/