api显示全球当前城市7天内天气预报效果代码

代码语言:html

所属分类:其他

代码描述:api显示全球当前城市7天内天气预报效果代码

代码标签: api 显示 全球 当前 城市 7天内 天气 预报

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
@import url("https://fonts.googleapis.com/css?family=Lato");
@font-face {
  font-family: 'Weather-Icons';
  font-style: normal;
  font-weight: normal;
  src: url("https://cdnjs.cloudflare.com/ajax/libs/weather-icons/2.0.9/font/weathericons-regular-webfont.ttf");
}
body {
  overflow: hidden;
  padding: 0;
  margin: 0;
  color: #fff;
  font-family: 'Lato', sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 18px;
}
.wrapper {
  background-color: #353535;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  height: 100vh;
  text-align: center;
}
.wrapper .today {
  flex: 1;
}
.wrapper .today #city {
  color: #888;
  margin: 0.1rem;
}
.wrapper .today .weatherInfo {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
}
.wrapper .today .weatherInfo #weatherIcon {
  font-size: 10vh;
  height: 10vh;
}
.wrapper .today .weatherInfo #weatherIcon:after {
  font-family: 'Weather-Icons';
  content: attr(data-icon);
}
.wrapper .t.........完整代码请登录后点击上方下载按钮下载查看

网友评论0