diff --git a/css/index.css b/css/index.css index 7695f8e..1058265 100644 --- a/css/index.css +++ b/css/index.css @@ -339,3 +339,41 @@ editor { background-color: #ff0000; z-index: 999; } +.loading { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.5); + z-index: 999; + align-items: center; + justify-content: center; + animation: show 0.5s; + display: flex; + flex-direction: column; + color: #fff; + font-size: 14px; +} +.loading .loading-img { + width: 1.2rem; + height: 1.2rem; + animation: loadingRotate 1s linear infinite; + margin-bottom: 10px; +} +@keyframes show { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes loadingRotate { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} diff --git a/css/index.less b/css/index.less index 04b7a42..579b6d6 100644 --- a/css/index.less +++ b/css/index.less @@ -399,3 +399,49 @@ editor { background-color: #ff0000; z-index: 999; } + +.loading { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.5); + z-index: 999; + display: flex; + align-items: center; + justify-content: center; + animation: show 0.5s; + display: flex; + flex-direction: column; + color: #fff; + font-size: 14px; + + .loading-img { + width: 1.2rem; + height: 1.2rem; + // 动画 + animation: loadingRotate 1s linear infinite; + margin-bottom: 10px; + } +} + +@keyframes show { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes loadingRotate { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} diff --git a/img/loading.png b/img/loading.png new file mode 100644 index 0000000..1c4effd Binary files /dev/null and b/img/loading.png differ diff --git a/index.html b/index.html index 13963ce..413937f 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,10 @@
+
+ + 上传中 +