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 .today .weatherInfo #forecast { align-self: flex-end; margin: 0.5rem 1rem; } .wrapper .today .temperature-wrapper { display: flex; justify-content: center; } .wrapper .today #temperature { font-size: 28vh; position: relative; } .wrapper .today #temperature #metrics { position: absolute; top: -0.3em; right: -0.3em; font-size: 13vh; } .wrapper .today #temperature #metrics:hover { color: #90ee90; } .wrapper .today #temperature #metrics:after { font-family: 'Weather-Icons'; content: attr(data-icon); } .wrapper .daily { display: flex; flex-direction: column; justify-content: center; } .wrapper .daily .low-high { font-size: 1rem; color: #fff; display: flex; flex-direction: row; justify-content: center; align-items: center; } .wr.........完整代码请登录后点击上方下载按钮下载查看
网友评论0