javascript - 这个网页的加载中的动画是通过什么实现的?是canvas吗?我想仿制一个应该怎么搞?

查看:128
本文介绍了javascript - 这个网页的加载中的动画是通过什么实现的?是canvas吗?我想仿制一个应该怎么搞?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

http://www.xiaomantou.net/

解决方案

http://runjs.cn/detail/qkpuuef7
珍藏多年的代码。

<!-- HTML-->
<div class="spinner5">
    <div class="bounce1"></div>
    <div class="bounce2"></div>
    <div class="bounce3"></div>
</div>    

// CSS3
.spinner5 {
  width: 100px;
  text-align: center;
}
 
.spinner5 > div {
  width: 20px;
  height: 20px;
  background-color: #67CF22;
 
  border-radius: 100%;
  display: inline-block;
  -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
  animation: bouncedelay 1.4s infinite ease-in-out;
  /* Prevent first frame from flickering when animation starts */
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}
 
.spinner5 .bounce1 {
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}
 
.spinner5 .bounce2 {
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
}
 
@-webkit-keyframes bouncedelay {
  0%, 80%, 100% { -webkit-transform: scale(0.0) }
  40% { -webkit-transform: scale(1.0) }
}
 
@keyframes bouncedelay {
  0%, 80%, 100% {
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 40% {
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
  }
}

这篇关于javascript - 这个网页的加载中的动画是通过什么实现的?是canvas吗?我想仿制一个应该怎么搞?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆