div+css实现在迷雾树林中骑车穿行动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现在迷雾树林中骑车穿行动画效果代码

代码标签: div css 迷雾 树林 骑车 穿行 动画

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

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

<style>
    * {
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
}

.hero {
  width: 100%;
  height: 100%;
  min-height: 450px;
  position: relative;
  top: 0;
  left: 0;
  background-color: #d9edfd;
  transform: translate3d(0, 0, 0);
}

.layer-1 {
  animation: parallax_fg linear 20s infinite both;

  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 136px;
}

.layer-2 {
  animation: parallax_fg linear 30s infinite both;
  background: url(//repo.bfw.wiki/bfwrepo/images/beaut/2.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 145px;
}

.layer-3 {
  animation: parallax_fg linear 55s infinite both;
  background: url(//repo.bfw.wiki/bfwrepo/images/beaut/3.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 158px;
}

.layer-4 {
  animation: parallax_fg linear 75s infinite both;
  background: url(//repo.bfw.wiki/bfwrepo/images/beaut/4.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: auto 468px;
}

.layer-5 {
  animation: parallax_fg linear 95s infinite both;
  background: url(//repo.bfw.wiki/bfwrepo/images/beaut/5.png) 0 100% repeat-x;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backgrou.........完整代码请登录后点击上方下载按钮下载查看

网友评论0