-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 首屏 Loading | ||
|
||
首屏 Loading 是指首次访问页面,在页面上空白的等待时间时,会展示一个 Loading 动画,直到页面加载完成。 | ||
|
||
![](/loading.png){data-zoomable} | ||
|
||
## 自定义 | ||
|
||
直接修改根目录下的 `/loading.html` 文件即可,你可以从 [CSS Loaders](https://css-loaders.com/) 网站中找找灵感,它提供了 600+ 个纯 CSS 的加载动画。 | ||
|
||
## 原理 | ||
|
||
框架会自动读取 `/loading.html` 文件内容并在 Vite 构建前注入到 `/index.html` 中,所以它也支持 Vite 的 [HTML 环境变量替换](https://cn.vitejs.dev/guide/env-and-mode.html#html-env-replacement)。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.