https://github.com/quansitech/qs-preload
首屏加载进度
https://github.com/quansitech/qs-preload
Last synced: about 1 month ago
JSON representation
首屏加载进度
- Host: GitHub
- URL: https://github.com/quansitech/qs-preload
- Owner: quansitech
- Created: 2021-08-30T02:31:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T09:56:36.000Z (over 4 years ago)
- Last Synced: 2025-01-13T10:50:10.147Z (over 1 year ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 轻量首屏加载进度效果
1. 2KB的文件大小,非常轻量
2. 简单易用
3. 分析了多个获奖网站的首屏加载效果,选取了一种logo透明渐变的加载效果,设计感十足。
## 用法
```javascript
```
js会自动往window变量注册一个preload函数
```javascript
//第一个参数设置logo
//第二个参数接受数组,需要进行监控加载的js文件
window.preload('https://domain/favicon.ico', ['https://domain/Public/js/main.js', 'https://domain/Public/js/main1.js']);
```
## 效果
