目录
一款狐狸首发很早的zibll子比主题顶部多功能组件下面滚动波浪的动画,主题美化,子比美化实现幻灯片循环滚动波浪动画效果,此代码已适配子比主题白天/昼夜兼容切换,喜欢折腾网站的可以拿去用,狐狸库首发版权喜欢的自行部署吧!
代码部署
一共两个代码,一个是CSS样式,一个是JS代码,话不多说直接开始!
css代码
/*幻灯片循环滚动波浪动画*/
.parallax {
fill: var(--body-bg-color);
/*fill: #f1f3f4;*/
}
.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代码
JS代码经过加密最好不要在外站引用了,建议下载文件本地引用吧,跟步骤三步走首先将下面的代码放到:子比主题–>>自定义头部HTML代码,然后我们引入文件,下面的文件直接上传到主题JS文件夹内即可!
<script src="/wp-content/themes/zibll/qianli/js/ueo_wave.js"></script>
定位:/wp-content/themes/zibll,我们将下面附件上传子比目录解压即可!
