jquery获取经纬度展示当地天气预报效果代码

代码语言:html

所属分类:其他

代码描述:jquery获取经纬度展示当地天气预报效果代码

代码标签: jquery 获取 经纬度 展示 当地 天气 预报

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


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

<head>

  <meta charset="UTF-8">
  

  <meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet">
  
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.5.6.1.css">
  
<style>
* {
  padding: 0;
  margin: 0;
  font-family: Quicksand;
}

body {
  background: #f3f2ef;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  height: 100vh;
  width: 100vw;
}

html,
body {
  height: 100%;
}

html {
  background: #eee;
}

.box {
  width: 20vw;
  height: 60vh;
  border-radius: 5px;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
  background: #a5bbdd;
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  min-width: 200px;
  min-height: 350px;
}

.wave {
  opacity: 0.3;
  position: absolute;
  top: 120%;
  left: 50%;
  background: white;
  width: 500px;
  height: 500px;
  margin-left: -250px;
  margin-top: -250px;
  transform-origin: 50% 48%;
  border-radius: 43%;
  animation: drift 3000ms infinite linear;
  z-index: 1;
}

.wave.-three {
  animation: drift 5000ms infinite linear;
  z-index: 2 !important;
  opacity: 0.2;
}

.wave.-two {
  animation: drift 7000ms infinite linear;
  opacity: 0.1;
  z-index: 3 !important;
}

.box:after {
  content: "";
  display: block;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 11;
  transform: translate3d(0, 0, 0);
}

@keyframes drift {
  from {
    transform: rotate(0deg);
  }
  from {
    transform: rotate(360deg);
  }
}
.info {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 45%;
  z-index: 4;
}

.location {
  text-align: center;
  font-weight: 800;
}

.date {
  text-align: center;
  margin-top: 5%;
  color: #9a9a9a;
  font-size: 70%;
}

.temp {
  margin-top: 10%;
  text-align: center;
}

.weathercon {
  height: 55%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3em;
}

@media (max-width: 600px) {
  .box {
    width: 90vw;
    height: 80vh;
  }

  .wave {
    top: 85%;
  }

  .weathercon {
    font-size: 5em;
  }

  .info {
    font-size: 1.5rem;
  }
}
@media (max-height: 500px) {
  .box {
    height: 80vh;
  }

  .wave {
    top: 115%;
  }
}
body > span {
  width: 100vw;
  text-align: center;
  color: grey;
}
</style>

</head>

<body  >
  <div class='box'>
  <div class='wave -one'></div>
  <div class='wave -two'></div>
  <div class='wave -three'></div>
  <div class="weathercon"><i class='fas fa-sun' style='color: #d36326;'></i></div>
  <div class="info">
    <h2 class="location">SUNNYVILLE</h2>
    <p class="date">MONDAY | SEP 12 | 12:34</p>
    <.........完整代码请登录后点击上方下载按钮下载查看

网友评论0