div+css实现天气预报卡片悬浮伸缩动画效果代码

代码语言:html

所属分类:悬停

代码描述:div+css实现天气预报卡片悬浮伸缩动画效果代码

代码标签: div css 天气 预报 卡片 悬浮 伸缩 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;900&amp;display=swap'>
<style>
    * {
  position: relative;
  font-family: "Poppins", sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #064C59;
}

.box {
  height: 70%;
  max-height: 300px;
  position: relative;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
}
.box:hover .right {
  width: 500px;
}
.box:hover .templine {
  opacity: 1;
}
.box:hover .week {
  opacity: 1;
  top: 0;
}

.left, .right {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
}

.left {
  width: 250px;
  height: 300px;
  background-color: #fff;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
}
.left .text {
  margin: 30px;
  color: #064C59;
}
.left .area {
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 600;
}
.left .time {
  margin-bottom: 5px;
}
.left .detail {
  margin-bottom: 5px;
  font-size: 10px;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0