在@Abhilash的帮助下,我能够完成此任务。我从w3schools获得了装载程序代码。
我
project/web/index.html就是这样。
<html><head> <meta charset="UTF-8"> <title>Title</title> <script defer src="index.dart.js" type="application/javascript"></script> <style> .loading { display: flex; justify-content: center; align-items: center; margin: 0; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .loader { border: 16px solid #f3f3f3; border-radius: 50%; border-top: 16px solid blue; border-right: 16px solid green; border-bottom: 16px solid red; border-left: 16px solid pink; width: 120px; height: 120px; -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style></head><body> <div > <div ></div> </div> <script src="main.dart.js" type="application/javascript"></script></body></html>


