纯CSS实现2圆渐隐切换的Loading特效 30/117
这是一个非常简单而实用的纯CSS实现的 Loading 特效。它由两个圆圈横向排列,交替渐隐切换。这种动画效果很适合用于页面加载过程中,为用户提供一个愉悦的等待体验。
在这个特效的设计中,使用了CSS的animation属性来实现圆圈的渐隐切换效果。这个特效的实现并没有用到任何JavaScript,这意味着它可以帮助提升网站的性能,同时也减少了代码的复杂性。
这个特效的视觉效果非常出色,它为用户提供了一个简单而美观的等待界面。如果您正在寻找一个简单而实用的加载动画,那么这个纯CSS实现的2圆渐隐切换的Loading特效一定会是一个不错的选择。
希望这个特效能够为您的网站增添一些活力和趣味性!

<div class="loading">
<div></div>
<div></div>
</div>
<style>
.loading,
.loading > div {
position: relative;
box-sizing: border-box;
}
.loading {
display: block;
font-size: 0;
color: #000;
}
.loading.la-dark {
color: #333;
}
.loading > div {
display: inline-block;
float: none;
background-color: currentColor;
border: 0 solid currentColor;
}
.loading {
width: 32px;
height: 32px;
}
.loading > div {
position: absolute;
top: 0;
left: 0;
width: 32px;
height: 32px;
border-radius: 100%;
opacity: 0.5;
animation: ball-scale-pulse 2s infinite ease-in-out;
}
.loading > div:last-child {
animation-delay: -1s;
}
.loading.la-sm {
width: 16px;
height: 16px;
}
.loading.la-sm > div {
width: 16px;
height: 16px;
}
.loading.la-2x {
width: 64px;
height: 64px;
}
.loading.la-2x > div {
width: 64px;
height: 64px;
}
.loading.la-3x {
width: 96px;
height: 96px;
}
.loading.la-3x > div {
width: 96px;
height: 96px;
}
@keyframes ball-scale-pulse {
0%,
100% {
transform: scale(0);
}
50% {
transform: scale(1);
}
}
</style>
相关推荐
-
第18问:MySQL CPU 高了,怎么办?2025-02-24 10:27:18
-
mysql索引类型 normal, unique, full text
mysql索引类型 normal, unique, full text2025-02-24 10:05:05 -
uwsgi+django+nginx 搭建部分总结2025-02-24 10:03:33
-
使用Docker配置Nginx环境部署Nextcloud2025-02-24 10:02:03
-
Nginx安装和怎么使用2025-02-24 10:00:45