lodash实现滚动鼠标圆形图文飞入飞出幻灯切换效果代码

代码语言:html

所属分类:幻灯片

代码描述:lodash实现滚动鼠标圆形图文飞入飞出幻灯切换效果代码

代码标签: lodash 滚动 鼠标 圆形 图文 飞入 飞出 幻灯 切换

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

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

<head>
    <meta charset="UTF-8">
    <style>
        /* imports */
    @import url("https://fonts.googleapis.com/css2?family=Ubuntu&display=swap");
    /* reset */
    *,
    *:before,
    *:after {
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    html,
    body,
    div,
    span,
    applet,
    object,
    iframe,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    blockquote,
    pre,
    a,
    abbr,
    acronym,
    address,
    big,
    cite,
    code,
    del,
    dfn,
    em,
    font,
    img,
    ins,
    kbd,
    q,
    s,
    samp,
    small,
    strike,
    strong,
    sub,
    sup,
    tt,
    var,
    dl,
    dt,
    dd,
    ol,
    ul,
    li,
    fieldset,
    form,
    label,
    legend,
    table,
    caption,
    tbody,
    tfoot,
    thead,
    tr,
    th,
    td {
      margin: 0;
      padding: 0;
      border: 0;
      outline: 0;
      font-weight: inherit;
      font-style: inherit;
      font-size: 100%;
      font-family: inherit;
      vertical-align: baseline;
    }
    
    :focus {
      outline: 0;
    }
    
    body {
      line-height: 1;
      color: black;
      background: white;
    }
    
    ol,
    ul {
      list-style: none;
    }
    
    table {
      border-collapse: separate;
      border-spacing: 0;
    }
    
    caption,
    th,
    td {
      text-align: left;
      font-weight: normal;
    }
    
    blockquote:before,
    blockquote:after,
    q:before,
    q:after {
      content: "";
    }
    
    blockquote,
    q {
      quotes: "" "";
    }
    
    /* Variables */
    /* mixin */
    /* main */
    html,
    body {
      overflow: hidden;
    }
    
    body {
      background-color: #a0d9f8;
    }
    
    .bg {
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center center;
      overflow: hidden;
      height: 500px;
      width: 500px;
      position: fixed;
      transform: translateY(0px);
      transition: all 2s cubic-bezier(0.22, 0.44, 0, 1.15);
      position: absolute;
      margin: auto;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      border-radius: 50%;
      border: 0.55em solid #fff;
      transform-style: preserve-3d;
    }
    .bg:before {
      content: "";
      position: absolute;
      width: 100%;
      background: rgba(0, 0, 0, 0.35);
      height: 100%;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
    .bg:first-child {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(2) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/62edbefa20a31.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(3) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/62edbec862163.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(4) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/62edbe9ebb82e.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(5) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6065033ab18d9.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(6) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(7) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(8) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(9) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(10) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(11) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(12) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(13) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(14) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(15) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    .bg:nth-child(16) {
      background-image: url(//repo.bfw.wiki/bfwrepo/image/6078dc95244d6.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_500,h_500,/quality,q_90);
    }
    
    /* stacking */
    .bg:nth-child(1) {
      z-index: 16;
    }
    
    .bg:nth-child(2) {
      z-index: 15;
    }
    
    .bg:nth-child(3) {
      z-index: 14;
    }
    
    .bg:nth-child(4) {
      z-index: 13;
    }
    
    .bg:nth-child(5) {
      z-index: 12;
    }
    
    .bg:nth-child(6) {
      z-index: 11;
    }
    
    .bg:nth-child(7) {
      z-index: 10;
    }
    
    .bg:nth-child(8) {
      z-index: 9;
    }
    
    .bg:nth-child(9) {
      z-index: 8;
    }
    
    .bg:nth-child(10) {
      z-index: 7;
    }
    
    .bg:nth-child(11) {
      z-index: 6;
    }
    
    .bg:nth-child(12) {
      z-index: 5;
    }
    
    .bg:nth-child(13) {
      z-index: 4;
    }
    
    .bg:nth-child(14) {
      z-index: 3;
    }
    
    .bg:nth-child(15) {
      z-index: 2;
    }
    
    .bg:nth-child(16) {
      z-index: 1;
    }
    
    .content-wrapper {
      height: 400px;
      width: 400px;
      justify-content: center;
      text-align: center;
      color: #fff;
      font-family: "Ubuntu", sans-serif;
      font-weight: bold;
      text-transform: uppercase;
      will-change: transform;
      backface-visibility: hidden;
      transition: all 1.5s cubic-bezier(0.4, 0.6, 0, 1.2);
      width: 400px;
      position: absolute;
      margin: auto;
      top: 0;
      bottom: 0;
      right: 0;
      left: 0;
      transform: translateY(175px);
    }
    .content-title {
      font-size: 3.8em;
    }
    
    .bg.up-scroll {
      transform: translate3d(0, 100vh/2, 0);
    }
    .bg.up-scroll + .bg {
      scale: 0.5;
      opacity: 0;
    }
    .bg.up-scroll + .bg .content-wrapper {
      transform: translateY(300px);
    }
    
    .bg.down-scroll {
      transform: translate3d(50px, -100vh, 0) rotateZ(260deg);
    }
    .bg.down-scroll .content-wrapper {
      transform: translateY(-300px);
    }
    .bg.down-scroll + .bg:not(.down-scroll) {
      transform: translate3d(0, -50px/2, 0);
    }
    .bg.down-scroll + .bg:not(.down-scroll) .content-wrapper {
      transform: translateY(-300px/2);
    }
    
    .last-wrap {
      transform: translateY(150px);
    }
    
    /*  sm btn overlay styles  */
    .twitter-btn {
      position: fixed;
      margin: auto;
      bottom: 0;
      background-color: #1da1f2;
      border: 0.15em solid #1da1f2;
      border-left: none;
      border-bottom: none;
      border-radius: 0% 100% 0% 0%/0% 100% 0% 93%;
      height: 50px;
      width: 50px;
      cursor: pointer;
    }
    
    .in-btn {
      position: fixed;
      margin: auto;
      bottom: 0;
      right: 0;
      border: 0.15em solid #0072b1;
      border-right: none;
      border-bottom: none;
      border-radius: 100% 0% 0% 0%/100% 0% 0% 0%;
      background-color: #0072b1;
      height: 50px;
      width: 50px;
      cursor: pointer;
    }
    
    .fa-twitter {
      position: absolute;
      left: 0em;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0