css+js实现羊群越过围栏数数动画效果代码

代码语言:html

所属分类:动画

代码描述:css+js实现羊群越过围栏数数动画效果代码

代码标签: css js 羊群 越过 围栏 数数 动画

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


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

<head>

  <meta charset="UTF-8">

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

p, h1, h2, h3, h4 {
  display: inline-block;
  margin-block-start: 0em;
  margin-block-end: 0em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  padding-inline-start: 0px;
}

body {
  background-color: rgb(55, 29, 132);
  font-family: Arial, Helvetica, sans-serif;
  text-transform: uppercase;
}

.wrapper {
  position: absolute;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sheep-route {
  width: 100%;
  height: calc(44 * 3px);
  overflow-x: hidden;
}

.sheep-wrapper,
.sheep {
  position: absolute;
  transition: 0 linear;
}

.sheep-inner-wrapper {
  position: absolute;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.roll {
  transition: 0.8s;
  transform: rotate(-360deg);
}

.sheep::after {
  position: absolute;
  content: attr(baa);
  top: -20px;
  color: white;
  font-size: 15px;
  text-transform: lowercase;
}

.sprite {
  position: absolute;
}

.sheep.hide {
  opacity: 0;
}

.counter-wrapper {
  position: fixed;
  width: 100%;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: cen.........完整代码请登录后点击上方下载按钮下载查看

网友评论0