ZIPJavaScript+HTML+CSS实现12种常见加载画面 16.41KB

weixin_41793160

资源文件列表:

加载动画.zip 大约有12个文件
  1. 加载动画/光点闪烁.html 3.95KB
  2. 加载动画/加载转圈.html 3.82KB
  3. 加载动画/渐变旋转.html 3.71KB
  4. 加载动画/扩散波纹.html 3.98KB
  5. 加载动画/起伏方块.html 5.08KB
  6. 加载动画/升降波浪.html 3.52KB
  7. 加载动画/水平进度.html 4.17KB
  8. 加载动画/条形伸缩.html 3.74KB
  9. 加载动画/跳动点阵.html 3.48KB
  10. 加载动画/旋转方块.html 3.95KB
  11. 加载动画/旋转卡片.html 3.71KB
  12. 加载动画/折纸效果.html 3.99KB

资源介绍:

【JavaScript+HTML+CSS实现12种常见加载画面】本资源通过原生的JavaScript、HTML和CSS技术,详细介绍了12种常见的加载动画效果,包括光点闪烁、加载转圈、渐变旋转、扩散波纹、起伏方块、升降波浪、水平进度、条形伸缩、跳动点阵、旋转方块、旋转卡片、折纸效果。这些动画既实用又美观,适用于各种Web开发场景。文章不仅提供了每种动画的实现思路,还包括具体的代码示例,帮助开发者轻松将这些效果应用到实际项目中,从而提升用户体验并增强网页的互动性。
<!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 { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #e8f5e9; color: #1b5e20; } .container { text-align: center; } .export-button { padding: 12px 24px; font-size: 18px; background-color: #388e3c; color: white; border: none; border-radius: 30px; cursor: pointer; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); transition: all 0.3s ease-in-out; } .export-button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); background-color: #2e7d32; } .loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: none; justify-content: center; align-items: center; z-index: 9999; flex-direction: column; } .grid-container { width: 100px; height: 100px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 5px; } .grid-item { width: 20px; height: 20px; background-color: #66bb6a; animation: fly-in 2s ease-in-out infinite; } .grid-item:nth-child(1) { animation-delay: 0s; } .grid-item:nth-child(2) { animation-delay: 0.1s; } .grid-item:nth-child(3) { animation-delay: 0.2s; } .grid-item:nth-child(4) { animation-delay: 0.3s; } .grid-item:nth-child(5) { animation-delay: 0.4s; } .grid-item:nth-child(6) { animation-delay: 0.5s; } .grid-item:nth-child(7) { animation-delay: 0.6s; } .grid-item:nth-child(8) { animation-delay: 0.7s; } .grid-item:nth-child(9) { animation-delay: 0.8s; } .grid-item:nth-child(10) { animation-delay: 0.9s; } .grid-item:nth-child(11) { animation-delay: 1s; } .grid-item:nth-child(12) { animation-delay: 1.1s; } .grid-item:nth-child(13) { animation-delay: 1.2s; } .grid-item:nth-child(14) { animation-delay: 1.3s; } .grid-item:nth-child(15) { animation-delay: 1.4s; } .grid-item:nth-child(16) { animation-delay: 1.5s; } .loading-text { margin-top: 30px; font-size: 24px; text-transform: uppercase; letter-spacing: 3px; color: #66bb6a; } @keyframes fly-in { 0% { transform: scale(0) translate(0, 0); opacity: 0; } 50% { transform: scale(1.2) translate(50%, 50%); opacity: 0.5; } 100% { transform: scale(1) translate(0, 0); opacity: 1; } } </style> </head> <body> <div class="container"> <button class="export-button" onclick="exportData()">导出数据</button> </div> <div class="loading-overlay" id="loadingOverlay"> <div class="grid-container"> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> <div class="grid-item"></div> </div> <div class="loading-text">加载中...</div> </div> <script> function exportData() { // 隐藏按钮,显示进度条 document.querySelector('.container').style.display = 'none'; document.getElementById('loadingOverlay').style.display = 'flex'; // 模拟加载时间 setTimeout(function() { document.getElementById('loadingOverlay').style.display = 'none'; alert('数据导出完成'); document.querySelector('.container').style.display = 'block'; }, 5000); // 模拟5秒的加载时间 } </script> </body> </html>
100+评论
captcha
    类型标题大小时间
    ZIP可达鸭举牌网页版本在线生成源码html5.zip4.53MB8月前
    ZIP【浏览器插件】LAPLACE Login Sync 登录同步器.zip577.6KB8月前
    ZIP【浏览器插件】即刻图床.zip261.17KB8月前
    ZIP【浏览器插件】Vue.js Devtools.zip2.08MB8月前
    ZIP全新USDC合约秒U可仿空投TG小程序源码28.26KB8月前
    ZIPtesttestfafaffsafafasfsdfsafsaf28.59MB8月前
    ZIPTT桌球等3个文件.zip38.9MB8月前
    ZIPmockserver下载12.69MB8月前