子比主题-首页幻灯片循环滚动波浪动画

这是一款子比主题顶部多功能组件下面滚动波浪的动画,并且在子比主题中实现幻灯片循环滚动波浪动画效果,并且适配了子比主题白天/昼夜切换,喜欢的自行部署吧! 

演示图片

图片[1]-子比主题-首页幻灯片循环滚动波浪动画-黎洛极客网

代码部署

一共两个代码,一个是CSS样式,一个是JS代码,直接在子比主题后台 自定义代码 部署就行,话不多说直接开始!

CSS代码

.parallax {
  fill: var(--body-bg-color);
}
.parallax > use {
  animation: move-forever 30s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
  opacity: 0.5;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
  opacity: 0.6;
}
.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
  opacity: 0.7;
}
.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
  opacity: 1;
}
@keyframes move-forever {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}

JS代码

<script src="/wp-content/themes/zibll/xiaogongju/daen/js/tengfei_slide_wave.js"></script>

附件下载如果不想下载自己部署也可以用我们的api静态js如下代码直接使用

<script src="https://api.wvn.cn/s/cdnjs/zibi/波浪线动态/js/tengfei_slide_wave.js"></script>

© 版权声明
THE END
喜欢就支持一下吧!
点赞735赞赏 分享