loading.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <style>
  7. * { padding: 0px;margin: 0px; }
  8. html, body { width: 100%;height: 100%; }
  9. body {
  10. display: flex;
  11. justify-content: center;
  12. align-items: center;
  13. background-color: #1a1a1a;
  14. }
  15. canvas {
  16. /* border: 1px solid #333;
  17. border: 1px solid #333; */
  18. }
  19. * {
  20. -moz-user-select: none;
  21. -webkit-user-select: none;
  22. -ms-user-select: none;
  23. -khtml-user-select: none;
  24. user-select: none;
  25. }
  26. .mainTxt {
  27. position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background-color: #1a1a1a;
  28. display: flex;
  29. justify-content: center;
  30. align-items: center;
  31. font-size: 18px;
  32. color: #ffffff;
  33. font-weight: 700;
  34. }
  35. </style>
  36. <title>程序启动中</title>
  37. </head>
  38. <body>
  39. <div class="mainTxt">
  40. 程序启动中
  41. </div>
  42. <!-- <canvas id="loadingCanvas" width="200" height="200"></canvas>
  43. <script>
  44. const canvas = document.getElementById('loadingCanvas');
  45. const ctx = canvas.getContext('2d');
  46. const centerX = canvas.width / 2;
  47. const centerY = canvas.height / 2;
  48. const radius = 70;
  49. let startAngle = 0;
  50. const speed = 0.03;
  51. // 创建渐变色
  52. const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height);
  53. gradient.addColorStop(0, '#00ff00');
  54. gradient.addColorStop(0.5, '#00ffff');
  55. gradient.addColorStop(1, '#ff00ff');
  56. function draw() {
  57. ctx.clearRect(0, 0, canvas.width, canvas.height);
  58. // 设置阴影
  59. ctx.shadowBlur = 20;
  60. ctx.shadowColor = '#00ff00';
  61. ctx.beginPath();
  62. ctx.arc(centerX, centerY, radius, startAngle, startAngle + Math.PI * 1.5);
  63. ctx.lineWidth = 15;
  64. ctx.strokeStyle = gradient;
  65. ctx.stroke();
  66. startAngle += speed;
  67. requestAnimationFrame(draw);
  68. }
  69. draw();
  70. </script> -->
  71. </body>
  72. </html>