文章目录
- 一:彩球环绕加载特效
-
- 二:跷跷板加载特效
-
- 三:两个圆形加载特效
-
- 四:半环加载特效
-
- 五:音乐波动加载特效
-
- 六:四色圆环加载特效
-
- 七:圆环加载特效
-
一:彩球环绕加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="utf-8"><title>彩球环绕加载</title><style>body, html {height: 100%;margin: 0;display: flex;justify-content: center;align-items: center;}.app {width: 100%;height: 100vh;background-color: #ffffff;position: relative;display: flex;justify-content: center;align-items: center;}.loading {width: 150px;height: 150px;position: relative;display: flex;justify-content: center;align-items: center;}.circle {width: 24px;height: 24px;border-radius: 50%;position: absolute;animation: eff 2.5s ease-in-out infinite;mix-blend-mode: darken;filter: blur(2px);}.circle:nth-child(1) { background-color: #FF0000; animation-delay: 0s; }.circle:nth-child(2) { background-color: #00FF00; animation-delay: 0.5s; }.circle:nth-child(3) { background-color: #0000FF; animation-delay: 1s; }.circle:nth-child(4) { background-color: #FFFF00; animation-delay: 1.5s; }.circle:nth-child(5) { background-color: #FF00FF; animation-delay: 2s; }@keyframes eff {0% { transform: rotate(0deg) translateX(70px) rotate(0deg); }20% { transform: rotate(72deg) translateX(70px) rotate(-72deg); }40% { transform: rotate(144deg) translateX(70px) rotate(-144deg); }60% { transform: rotate(216deg) translateX(70px) rotate(-216deg); }80% { transform: rotate(288deg) translateX(70px) rotate(-288deg); }100% { transform: rotate(360deg) translateX(70px) rotate(-360deg); }}</style>
</head>
<body><div class="app"><div class="loading"><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div></div></div>
</body>
</html>
二:跷跷板加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="utf-8"><title>跷跷板加载</title><style>html, body {height: 100%;margin: 0;display: flex;justify-content: center;align-items: center;background-color: #282c34;}.app {width: 200px; height: 200px;display: flex;justify-content: center;align-items: center;}.loading73 {width: 100px;height: 100px;position: relative;display: flex;justify-content: center;align-items: center;transform-origin: center center;animation: effbox73 4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;}@keyframes effbox73 {0% {transform: rotate(-45deg);}25% {transform: rotate(45deg);}50% {transform: rotate(-45deg);}75% {transform: rotate(45deg);}100% {transform: rotate(-45deg);}}.loading73::before {content: '';width: 100%;height: 6px;background: linear-gradient(to right, #ff7e5f, #feb47b);position: absolute;left: 0;top: 50%;transform: translateY(-50%);border-radius: 3px;}.loading73::after {content: '';width: 20px;height: 20px;background: radial-gradient(circle, #ea990c, #ff5f6d);position: absolute;top: 15px;left: -10px;border-radius: 50%;animation: eff73 4s ease-in-out infinite;box-shadow: 0 0 10px rgba(255, 95, 109, 0.7);}@keyframes eff73 {0% {transform: translateX(0) scale(1);}20% {transform: translateX(40px) scale(1.2) rotate(90deg);}40% {transform: translateX(80px) scale(1) rotate(180deg);}60% {transform: translateX(40px) scale(0.8) rotate(270deg);}80% {transform: translateX(0) scale(1) rotate(360deg);}100% {transform: translateX(0) scale(1);}}</style>
</head>
<body><div class="app"><div class="loading73"></div></div>
</body>
</html>
三:两个圆形加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="zh"><head><meta charset="utf-8"><title>两个圆形加载</title><style>body, html {height: 100%; margin: 0; display: flex; justify-content: center; align-items: center; }.app{width: 100%; height: 100vh; background-color: #ffffff; position: relative; display: flex; justify-content: center; align-items: center;
}
.loading{width: 100px; height: 60px; position: relative; display: flex; justify-content: center; align-items: center;
}
.circle{width: 24px; height: 24px; border-radius: 50%; position: absolute; animation: eff 2s ease-in-out infinite; mix-blend-mode: darken; filter: blur(2px);
}
.circle:nth-child(1){background-color: #00FFFF;
}
.circle:nth-child(2) {background-color: #FFFF00; animation-delay: 1s;
}
@keyframes eff{0%, 50%, 100% {transform: translateX(0) }25% {transform: translateX(70%) }75% {transform: translateX(-70%) }
}</style></head><body><div class="app"><div class="loading"><div class="circle"></div><div class="circle"></div></div></div></body>
</html>
四:半环加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>半环加载特效</title><style>body {display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #282c34; overflow: hidden;
}.loader {position: relative; width: 100px; height: 100px;
}.loader::before, .loader::after {content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; border: 6px solid transparent; border-top-color: #3498db; animation: spin 1.5s linear infinite, gradientColor 6s ease infinite;
}.loader::after {border-top-color: #ff5733; animation-delay: -0.75s; transform: scale(0.8);
}@keyframes spin {0% {transform: rotate(0deg); }100% {transform: rotate(360deg); }
}@keyframes gradientColor {0%, 100% {border-top-color: #3498db; }50% {border-top-color: #9b59b6; }
}</style>
</head>
<body><div class="loader"></div>
</body>
</html>
五:音乐波动加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>音乐波动加载</title><style>body, html {height: 100%; margin: 0; display: flex; justify-content: center; align-items: center; }.boxMain {width: 84px; height: 32px; display: flex; justify-content: space-between; align-items: flex-end; position: relative; }.boxItem {width: 6px; box-sizing: border-box; background-color: #97e138; animation: itemAnimate 2s linear infinite; box-shadow: 0 -1px 0 #ffffff, 0 -2px 0 #97e138; }.boxItem:nth-of-type(2) {background-color: #0421b1; animation-delay: 0.3s; animation-duration: 2.0s; box-shadow: 0 -1px 0 #ffffff, 0 -2px 0 #0421b1; }.boxItem:nth-of-type(3) {background-color: #c00ee8; animation-delay: 0.38s; box-shadow: 0 -1px 0 #ffffff, 0 -2px 0 #c00ee8; }.boxItem:nth-of-type(4) {background-color: #eb2406; animation-delay: 0.5s; box-shadow: 0 -1px 0 #ffffff, 0 -2px 0 #eb2406; }.boxItem:nth-of-type(5) {background-color: #fff200; animation-duration: 2.4s; box-shadow: 0 -1px 0 #ffffff, 0 -2px 0 #fff200; }@keyframes itemAnimate {0% {height: 0; }50% {height: 32px; }100% {height: 0; }}</style>
</head>
<body><div class="boxMain"><div class="boxItem"></div><div class="boxItem"></div><div class="boxItem"></div><div class="boxItem"></div><div class="boxItem"></div></div>
</body>
</html>
六:四色圆环加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"><title>四色圆环加载</title> <style>body, html {height: 100%; margin: 0; display: flex; justify-content: center; align-items: center; background-color: #f0f0f0;
}.loader-container {position: relative; width: 150px; height: 150px;
}.loader {border: 16px solid rgba(0, 0, 0, 0.1); border-radius: 50%; border-left-color: #ff0000; border-right-color: #00ff00; border-top-color: #0000ff; border-bottom-color: #ffff00; width: 0; height: 0; animation: spin 1s linear infinite; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-sizing: border-box;
}@keyframes spin {0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}.loader.loading {width: 150px; height: 150px; border-width: 8px; animation: expand 2s cubic-bezier(0.42, 0, 0.58, 1) infinite alternate;
}.loader.hidden {display: none;
}@keyframes expand {0% {width: 0; height: 0; border-width: 16px; }100% {width: 150px; height: 150px; border-width: 8px; }
}</style>
</head>
<body><div class="loader-container"><div class="loader loading"></div> </div>
</body>
<script>document.addEventListener('DOMContentLoaded', () => {const loader = document.querySelector('.loader');});
</script>
</html>
七:圆环加载特效
1.效果展示

2.HTML
完整代码
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>复杂炫酷页面加载特效</title><style>body, html {margin: 0;padding: 0;width: 100%;height: 100%;font-family: Arial, sans-serif;display: flex;justify-content: center;align-items: center;background-color: #1e1e1e;overflow: hidden;}#loader-wrapper {position: fixed;width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;align-items: center;z-index: 9999;background: linear-gradient(to right, #ff7e5f, #feb47b);animation: gradient-animation 5s infinite;}@keyframes gradient-animation {0% { background-position: 0% 50%; }50% { background-position: 100% 50%; }100% { background-position: 0% 50%; }}#loader {border: 16px solid #f3f3f3;border-radius: 50%;border-top: 16px solid #3498db;width: 120px;height: 120px;animation: spin 2s linear infinite;}#loader-text {margin-top: 20px;font-size: 24px;color: #fff;font-weight: bold;text-transform: uppercase;letter-spacing: 2px;animation: fade-in-out 2s infinite;}@keyframes spin {0% { transform: rotate(0deg); }100% { transform: rotate(360deg); }}@keyframes fade-in-out {0%, 100% { opacity: 1; }50% { opacity: 0.5; }}</style>
</head>
<body><div id="loader-wrapper"><div id="loader"></div><div id="loader-text">加载中...</div></div>
</body>
</html>