树莓派ouxuanac启动器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.7 KiB

  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="jquery-3.1.1.min.js"></script>
  6. <style>
  7. html, body {
  8. text-align: center;
  9. /*background: linear-gradient(135deg, #3023ae 0%, #c86dd7 100%);*/
  10. cursor: none;
  11. padding: 0;
  12. margin: 0;
  13. }
  14. .loading {
  15. background: #50bfff;
  16. width: 100%;
  17. height: 100%;
  18. z-index: 9999;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <iframe src="" frameborder="0" id="content"
  24. style="width: 100%;height: 100%;position: fixed;left: 0px;display: none;"></iframe>
  25. <div class="loading" style="position: fixed;left: 0px;">
  26. <div style="text-align:center;width:120px;height:120px;position:fixed;top:50%;left:50%;margin-left:-60px;margin-top:-60px;background: #50bfff;display: none"
  27. id="loading_img">
  28. <img src="oval.svg" style="width:100%;height:100%;">
  29. </div>
  30. </div>
  31. </body>
  32. <script>
  33. function check() {
  34. $.ajax({
  35. url: "http://localhost/",
  36. success: function () {
  37. setTimeout(function () {
  38. document.getElementById("content").src = "http://localhost/?t=" + Math.random();
  39. $("#content").show();
  40. setTimeout(function () {
  41. $(".loading").fadeOut(1000)
  42. },2000);
  43. }, 3000)
  44. },
  45. error: function (err) {
  46. setTimeout(function () {
  47. check()
  48. }, 1000)
  49. }
  50. });
  51. }
  52. $("#loading_img").fadeIn(2000, function () {
  53. check();
  54. })
  55. </script>
  56. </html>