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

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

http://www.xiaomantou.net/


这种简单的,自己css写写就行了,带百分比进度的,资源的载入的百分比,才是难点。


用一个gif就行了


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);
  }
}

我补充一下,这种可以去搜索“Loader动画”或者直接参考Loader.css,上边都是类似的~

【热门文章】
【热门文章】