效果预览

开工

后台插入css

登录wordpress后台>外观>Sakura主题设置。
找到插入css代码的框。
wave_houtai

粘贴如下代码:

#banner_wave_1 {
  width: auto;
  height: 65px;
  background: url(https://cdn.qnight.ink/blogfile/wave1.png) repeat-x;
  _filter: alpha(opacity=80);
  position: absolute;
  bottom: 0;
  width: 400%;
  left: -236px;
  z-index: 5;
  opacity: 1;
  transiton-property: opacity,bottom;
  transition-duration: .4s,.4s;
  animation-name: move2;
  animation-duration: 240s;
  animation-fill-mode: backwards;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
#banner_wave_2 {
  width: auto;
  height: 80px;
  background: url(https://cdn.qnight.ink/blogfile/wave2.png) repeat-x;
  _filter: alpha(opacity=80);
  position: absolute;
  bottom: 0;
  width: 400%;
  left: 0;
  z-index: 4;
  opacity: 1;
  transiton-property: opacity,bottom;
  transition-duration: .4s,.4s;
  animation-name: move2;
  animation-duration: 160s;
  animation-fill-mode: backwards;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
 
@keyframes move1 {
100%{
  background-position: 100% 0;
}
}
 
@keyframes move2 {
100%{
  background-position: -100% 0;
}
}
.banner_wave_hide,.banner_wave_hide_fit_skin {
  opacity:0 !important;
  bottom:-999px !important
}
.headertop-down {
  position:absolute;
  bottom:50px;
  left:calc(50% - 14px);
  cursor:pointer;
  z-index:5
}
@media(max-width:860px) {
  .headertop-down {
  display:none
}
}.headertop-down i {
  font-size:28px;
  color:#fff;
  -ms-transform:scale(1.5,1);
  -webkit-transform:scale(1.5,1);
  transform:scale(1.5,1)
}

footer.php中引用js

找到主题文件夹下footer.php文件。

mod_footer

</body>前插入如下代码:

<script src="https://cdn.jsdelivr.net/gh/acai66/live2d@0.4/wave.js" async="async"></script>

保存,可以查看效果了,有效的可以回来点个赞哦!

其他

转载出处: https://hyacm.com/acai/ui/181/sakura-wave/

Q.E.D.


爱你所爱,行你所行,听从你心,无问西东。