anime实现上下拖动加减数字动画效果代码

代码语言:html

所属分类:拖放

代码描述:anime实现上下拖动加减数字动画效果代码

代码标签: anime 上下 拖动 加减 数字 动画

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

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

<head>
  <meta charset="UTF-8">

  <link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

  
  
<style>
html, body {
  height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  color: #231F20;
  font-size: 20px;
  background: #FFF3F5;
}

.wrap {
  position: relative;
  margin-left: 65px;
  margin-top: 65px;
}

.stepper {
  margin-top: -65px;
  margin-left: -65px;
  width: 30px;
  height: 30px;
  background: #FF4957;
  cursor: pointer;
  width: 130px;
  height: 130px;
  border-radius: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 64px;
  position: relative;
  box-shadow: -1px 57px 80px -17px rgba(255, 73, 87, 0.25);
  overflow: hidden;
  z-index: 2;
}
.stepper span {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateY(0) translateX(-50%);
}
.stepper span.active {
  transform: translateY(0) translateX(-50%);
}
.stepper span.hide {
  opacity: 0;
}

.arrow-top {
  position: absolute;
  top: -120px;
  left: 0;
  transform: translateX(-50%);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  width: 50px;
  opacity: 0.3;
}

.arrow-bottom {
  position: absolute;
  bottom: -57px;
  left: 0;
  transform: translateX(-50%);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  width: 50px;
   opacity: 0.3;
}



@-webkit-keyframes github {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes github {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
.desc {
  position: absolute;
  top: 40px;
  left: 40px;
  color: #ffbac1;
}
</style>


  
  
</head>

<body translate="no">
  <div class="wrap">
    <div class="stepper">
        <span class="count first active hide">15</span>
        <span class="count second next"></span>
    </div>
    <img src="//repo.bfw.wiki/bfwrepo/icon/64c4c39eac6c9.png" alt="" class="arrow-top">
    <img src="//repo.bfw.wiki/bfwrepo/icon/64c4c3aaafa6e.png" alt="" class="arrow-bottom">
</div>

<span class="desc">Hold & Drag</span>

<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></scr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0