代码如下:
css3 loading等待加载代码 - 何问起 @keyframes move { from { transform: translate(0,50%); } to { transform: translate(0,850%); } } * { margin: 0; padding: 0; } body { min-width: 325px; height: 100vh; display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; align-content: flex-start; background: #2a2a2a; } figure { margin: 30px; width: 250px; height: 250px; border-radius: 50%; position: relative; background: #1c1c1c; } section { width: 10%; height: 100%; position: absolute; left: 45%; } section:nth-child(2) { transform: rotate(22.5deg); } section:nth-child(3) { transform: rotate(45deg); } section:nth-child(4) { transform: rotate(67.5deg); } section:nth-child(5) { transform: rotate(90deg); } section:nth-child(6) { transform: rotate(112.5deg); } section:nth-child(7) { transform: rotate(135deg); } section:nth-child(8) { transform: rotate(157.5deg); } figure p { height: 10%; border-radius: 50%; background: dodgerblue; animation: move 1s ease-in-out infinite alternate; } figure:nth-child(1) > section:nth-child(1) > p { animation-delay: -0.1875s; } figure:nth-child(1) > section:nth-child(2) > p { animation-delay: -0.175s; } figure:nth-child(1) > section:nth-child(3) > p { animation-delay: -0.1625s; } figure:nth-child(1) > section:nth-child(4) > p { animation-delay: -0.15s; } figure:nth-child(1) > section:nth-child(5) > p { animation-delay: -0.9375s; } figure:nth-child(1) > section:nth-child(6) > p { animation-delay: -0.925s; } figure:nth-child(1) > section:nth-child(7) > p { animation-delay: -0.9125s; } figure:nth-child(1) > section:nth-child(8) > p { animation-delay: -0.9s; } figure:nth-child(2) > section:nth-child(1) > p { animation-delay: -0.875s; } figure:nth-child(2) > section:nth-child(2) > p { animation-delay: -0.75s; } figure:nth-child(2) > section:nth-child(3) > p { animation-delay: -0.625s; } figure:nth-child(2) > section:nth-child(4) > p { animation-delay: -0.5s; } figure:nth-child(2) > section:nth-child(5) > p { animation-delay: -0.375s; } figure:nth-child(2) > section:nth-child(6) > p { animation-delay: -0.25s; } figure:nth-child(2) > section:nth-child(7) > p { animation-delay: -0.125s; } figure:nth-child(3) > section:nth-child(1) > p { animation-delay: -0.5s; } figure:nth-child(3) > section:nth-child(3) > p { animation-delay: -0.5s; } figure:nth-child(3) > section:nth-child(5) > p { animation-delay: -0.5s; } figure:nth-child(3) > section:nth-child(7) > p { animation-delay: -0.5s; } figure:nth-child(4) > section:nth-child(1) > p { animation-delay: -0.35s; } figure:nth-child(4) > section:nth-child(2) > p { animation-delay: -0.3s; } figure:nth-child(4) > section:nth-child(3) > p { animation-delay: -0.25s; } figure:nth-child(4) > section:nth-child(4) > p { animation-delay: -0.2s; } figure:nth-child(4) > section:nth-child(5) > p { animation-delay: -0.15s; } figure:nth-child(4) > section:nth-child(6) > p { animation-delay: -0.1s; } figure:nth-child(4) > section:nth-child(7) > p { animation-delay: -0.05s; }立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
立即学习“前端免费学习笔记(深入)”;
适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。
来源:何问起
以上就是使用CSS3来实现Loading动画特效的代码案例分享的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1608772.html
微信扫一扫
支付宝扫一扫