<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>酷炫Loading动画特效</title>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #0f0f1a;
overflow: hidden;
font-family: 'Arial', sans-serif;
}
.loading-container {
position: relative;
width: 300px;
height: 300px;
display: flex;
justify-content: center;
align-items: center;
}
.loading-text {
position: absolute;
color: #fff;
font-size: 24px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 2px;
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}
.orbit {
position: absolute;
width: 100%;
height: 100%;
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 50%;
animation: rotate 8s linear infinite;
}
.orbit:nth-child(1) {
animation-delay: -1s;
}
.orbit:nth-child(2) {
width: 80%;
height: 80%;
animation-delay: -2s;
animation-duration: 6s;
}
.orbit:nth-child(3) {
width: 60%;
height: 60%;
animation-delay: -3s;
animation-duration: 4s;
}
.particle {
position: absolute;
width: 12px;
height: 12px;
background: linear-gradient(45deg, #00ffcc, #ff00ff);
border-radius: 50%;
box-shadow: 0 0 10px #00ffcc, 0 0 20px #ff00ff;
transform: translate(-50%, -50%);
}
.particle-1 {
top: 0;
left: 50%;
animation: particle-1 2s ease-in-out infinite;
}
.particle-2 {
top: 50%;
right: 0;
animation: particle-2 2.5s ease-in-out infinite;
}
.particle-3 {
bottom: 0;
left: 50%;
animation: particle-3 3s ease-in-out infinite;
}
.particle-4 {
top: 50%;
left: 0;
animation: particle-4 3.5s ease-in-out infinite;
}
@keyframes rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes particle-1 {
0%, 100% { transform: translate(-50%, -50%) scale(1); }
50% { transform: translate(-50%, -50%) scale(1.5); }
}
@keyframes particle-2 {
0%, 100% { transform: translate(50%, -50%) scale(1); }
50% { transform: translate(50%, -50%) scale(1.5); }
}
@keyframes particle-3 {
0%, 100% { transform: translate(-50%, 50%) scale(1); }
50% { transform: translate(-50%, 50%) scale(1.5); }
}
@keyframes particle-4 {
0%, 100% { transform: translate(-50%, -50%) scale(1); }
50% { transform: translate(-50%, -50%) scale(1.5); }
}
.sparkle {
position: absolute;
width: 4px;
height: 4px;
background: #fff;
border-radius: 50%;
opacity: 0;
animation: sparkle 2s linear infinite;
}
@keyframes sparkle {
0% { opacity: 0; transform: scale(0); }
10% { opacity: 1; transform: scale(1); }
90% { opacity: 1; transform: scale(1); }
100% { opacity: 0; transform: scale(0); }
}
.link {
position: absolute;
bottom: 20px;
color: rgba(255, 255, 255, 0.5);
font-size: 12px;
text-decoration: none;
transition: color 0.3s;
}
.link:hover {
color: #00ffcc;
}
</style>
</head>
<body>
<div class="loading-container">
<div class="loading-text">Loading...</div>
<div class="orbit"></div>
<div class="orbit"></div>
<div class="orbit"></div>
<div class="particle particle-1"></div>
<div class="particle particle-2"></div>
<div class="particle particle-3"></div>
<div class="particle particle-4"></div>
<!-- 随机生成闪烁的小星星 -->
<script>
for (let i = 0; i < 20; i++) {
const sparkle = document.createElement('div');
sparkle.className = 'sparkle';
sparkle.style.left = Math.random() * 100 + '%';
sparkle.style.top = Math.random() * 100 + '%';
sparkle.style.animationDelay = Math.random() * 2 + 's';
document.querySelector('.loading-container').appendChild(sparkle);
}
</script>
</div>
</body>
</html>
酷炫Loading动画特效
于 2025-05-09 17:19:17 首次发布