32ae08ef
Depreciated: We have moved to isplib, and this package is no longer maintained.
The package itself is under CC0 license, but please note that some of the works cited therein have non-commercial restrictions.
Use it at your own risk. If necessary, you should consult a lawyer.
loadBackground
Abstract
Awesome background images for web pages.Usage
It is recommended that you replace latest
with a fixed version name to prevent your pages being interfered by breaking changes.
You can load the file (minified by default) from jsDelivr
```html
```
or UNPKG
```html
```
There are even more choices in China, but the speed and reliability cannot be guaranteed, and they may deliver outdated files.
知乎
```html
```
饿了么
```html
```
New Feature
Now You can assign towindow._imgPlace
to customize where to load the background image, which will be displayed behind document.body
by default.
```js
const imgPlace = document.getElementById('example');
window.imgPlace = imgPlace;
const divName = 'example';
window.imgPlace = imgPlace;
```
Compatibility
This file is expected to work well with the latest version ofChrome
/ Firefox
. If not, please contact us.
Technical Details
We are using dynamicimport()
to load subscriptscript.
See also: import - JavaScript | MDNAs the CacheStorage API is only available with a security context, we provide a file
withoutCache.js
for users without secure connection.
See also: CacheStorage - Web APIs | MDN