今天就跟大家聊聊有关CSS中怎么实现横向粒子变动加载动画,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
● 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中怎么实现横向粒子变动加载动画有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。
原文链接:https://www.jb51.net/css/454415.html