动画中的圆圈是如何扭曲的?
使用这段代码,点会反弹,但我不知道如何进行转换来改变点的形状。
我在 https://lottiefiles.com/87015-loading 找到了这个设计,但我找不到提取CSS。它给了我一个 json 但我需要 CSS。
这是动画:
.dot-typing {
position: relative;
left: -9999px;
width: 10px;
height: 10px;
border-radius: 5px;
background-color: #9880ff;
color: #9880ff;
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
animation: dotTyping 1s infinite linear;
}
@keyframes dotTyping {
0% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
16.667% {
box-shadow: 9984px -10px 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
33.333% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
50% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px -10px 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
66.667% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
83.333% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px -10px 0 0 #9880ff;
}
100% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
}
<div class="snippet" data-title=".dot-elastic dot-typing">
<div class="stage">
<div class="dot-elastic dot-typing"></div>
</div>
</div>
With this code the points bounce, but I don't know how to do the transformation to change the shape of the points.
I found this design at https://lottiefiles.com/87015-loading, but I couldn't extract the CSS. It gives me a json but I need the CSS.
Here is the animation:
.dot-typing {
position: relative;
left: -9999px;
width: 10px;
height: 10px;
border-radius: 5px;
background-color: #9880ff;
color: #9880ff;
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
animation: dotTyping 1s infinite linear;
}
@keyframes dotTyping {
0% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
16.667% {
box-shadow: 9984px -10px 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
33.333% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
50% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px -10px 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
66.667% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
83.333% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px -10px 0 0 #9880ff;
}
100% {
box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
}
}
<div class="snippet" data-title=".dot-elastic dot-typing">
<div class="stage">
<div class="dot-elastic dot-typing"></div>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
与您要求的动画相近的动画是我在
https://jsfiddle.net/e3uwb64a/202< /a>
HTML
CSS
你可以尝试使用它来获得你想要的。
One close animation to the one you are asking for I made it on
https://jsfiddle.net/e3uwb64a/202
HTML
CSS
you can try to play with it to get the one you want .