html - 如何显示天气图标
问题描述
我目前正在尝试整合天气图标。但是,如果我嵌入所有内容并将其插入到我的 HTML 中,则不会显示任何图标。以下是我的文件夹结构和 index.html。
我的文件夹结构如下:
- css
- 天气图标-wind.min.css
- 字体
- 天气图标-常规-webfont.eot
- 天气图标-常规-webfont.svg
- 天气图标-常规-webfont.ttf
- 天气图标-常规-webfont.woff
- 天气图标-常规-webfont.woff2
- 索引.html
索引.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>
推荐阅读
- batch-file - 使用启动参数启动程序 Sandboxie
- java - Java - 将 MultiSheet Excel 拆分为单独的 Excel,每个 Excel 包含单个工作表
- python - 如何在 python 中检查 intel MKL pardiso 的版本?
- keycloak - 如何通过employeeNumber或自定义属性搜索keycloak用户?
- database - 如何在 talend 2020 中读取 .dbf 文件?
- java - Firebase函数模拟器不适用于android
- reactjs - 如何更改 React 中组件的 z 索引?
- sql - CASE SQL 语句 oracle 数据库
- latitude-longitude - 将 ECEF XYZ 转换为 LLH (LAT/LONG/HEIGHT) 和翻译回来 - IronPython 脚本中不准确/可能的错误
- python - 如何为除 TButton 之外的所有 ttk 小部件配置地图?