css+js实现无限上下页翻页动画效果代码

代码语言:html

所属分类:布局界面

代码描述:css+js实现无限上下页翻页动画效果代码

代码标签: css js 无限 上下页 翻页 动画

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

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

<head>
    <meta charset="UTF-8">
    <style>
        html, body {
          height: 100%;
          overflow: hidden;
        }
        
        body {
          background: #393994;
        }
        
        .pagination-wrapper {
          font-size: 0;
          position: absolute;
          top:50%;
          left: 50%;
          transform: translate(-50%, -50%);
          text-align: center;
        }
        
        @keyframes pagination-container--animation-prev {
          0% { transform: translateX(0); }
          100% { transform: translateX(18px); }
        }
        
        @keyframes pagination-container--animation-next {
          0% { transform: translateX(0); }
          100% { transform: translateX(-18px); }
        }
        
        .transition-prev .pagination-container {
          animation: pagination-container--animation-prev 0.3s forwards;
        }
        
        .transition-next .pagination-container {
          animation: pagination-container--animation-next 0.3s forwards;
        }
        
        .little-dot {
          width: 6px;
          height: 6px;
          background: #fff;
          border-radius: 100%;
          display: inline-block;
          vertical-align: middle;
          margin: 0 6px;
          position: relative;
          z-index: 10;
        }
        
        .little-dot--first,
        .little-dot--last {
          z-index: 5;
        }
        
        @keyframes slideLeft {
          0% {
            transform: translateX(0px);
          }
        
          100% {
            transform: translateX(-18px);
          }
        }
        
        .transition-prev .little-dot--first {
          animation: slideLeft 0.4s 0.3s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
        }
        
        @keyframes little-dot--first--animation {
          0% { opacity: 1; }
          100% { opacity: 0; }
        }
        
        .transition-next .little-dot--first {
          animation: little-dot--last--animation 0.3s forwards;
        }
        
        
        @keyframes little-dot--last--animation {
          0% { opacity: 1; }
          100% { opacity: 0; }
        }
        
        .transition-prev .little-dot--last {
          animation: little-dot--last--animation 0.3s forwards;
        }
        
        @keyframes slideRight {
          0% {
            transform: translateX(0px);
            opacity: 1;
          }
        
          100% {
            transform: translateX(18px);
            opacity: 1;
          }
        }
        
        .transition-next .little-dot--last {
          animation: slideRight 0.4s 0.3s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
        }
        
        .big-dot {
          width: 12px;
          height: 12px;
          border-radius: 100%;
          background: #f6af54;
          position: absolute;
          top: 50%;
          right: -6px;
          transform: translateY(-50%);
        }
        
        .transition-next .big-dot {
          right: auto;
          left: -6px;
        }
        
        .big-dot-container {
          width: 18px;
          height: 18px;
          border-radius: 100%;
          position: absolute;
          top: 50%;
          right: 3px;
          transform: translateY(-50%);
          z-index: 10;
        }
        
        .transition-next .big-dot-container {
          right: auto;
          left: 3px;
        }
        
        @keyframes big-dot-conta.........完整代码请登录后点击上方下载按钮下载查看

网友评论0