本文主要包含CSS,粒子变动,加载动画等相关知识,佚名  希望在学习及工作中可以帮助到您
  本文实例为大家分享了CSS实现横向粒子变动加载动画的对应代码,供大家参考,具体内容如下

此处用到了CSS3动画animation属性的animation-fill-mode属性和animation-delay属性。
 ● animation-fill-mode属性规定动画在播放之前或之后,其动画效果是否可见。
        none:不改变默认行为。
        forwards:当动画完成后,保持最后一个属性值(在最后一个关键帧中定义)。
        backwards:在animation-delay所指定的一段时间内,在动画显示之前,应用开始属性值(在第一个关键帧
中定义)。
       both: 向前和向后填充模式都被应用。   
● animation-delay属性定义动画何时开始。该属性允许负值,示例中延迟0.16s执行动画。
- #loader7:before,
 - #loader7:after,
 - #loader7 {
 - border-radius: 50%;
 - width: 2.5em;
 - height: 2.5em;
 - -webkit-animation-fill-mode: both;
 - animation-fill-mode: both;
 - -webkit-animation: load7 1.8s infinite ease-in-out;
 - animation: load7 1.8s infinite ease-in-out;
 - }
 - #loader7 {
 - margin: 60px 50px;
 - float: left;
 - font-size: 10px;
 - position: relative;
 - text-indent: -9999em;
 - -webkit-animation-delay: 0.16s;
 - animation-delay: 0.16s;
 - }
 - #loader7:before {
 - left: -3.5em;
 - }
 - #loader7:after {
 - left: 3.5em;
 - -webkit-animation-delay: 0.32s;
 - animation-delay: 0.32s;
 - }
 - #loader7:before,
 - #loader7:after {
 - content: '';
 - position: absolute;
 - top: 0;
 - }
 - @-webkit-keyframes load7 {
 - 0%,
 - 80%,
 - 100% {
 - box-shadow: 0 2.5em 0 -1.3em #000000;
 - }
 - 40% {
 - box-shadow: 0 2.5em 0 0 #000000;
 - }
 - }
 - @keyframes load7 {
 - 0%,
 - 80%,
 - 100% {
 - box-shadow: 0 2.5em 0 -1.3em #000000;
 - }
 - 40% {
 - box-shadow: 0 2.5em 0 0 #000000;
 - }
 - }
 
以上就是本文的全部内容,希望对大家学习CSS样式进行加载有所帮助。

