Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/mask
Mask an element with spin & auto adjustment
https://github.com/chemzqm/mask
Last synced: about 1 month ago
JSON representation
Mask an element with spin & auto adjustment
- Host: GitHub
- URL: https://github.com/chemzqm/mask
- Owner: chemzqm
- Created: 2014-06-15T11:14:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-10T18:11:45.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T12:39:06.321Z (about 2 months ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Mask
Mask the entire viewport or element with auto adjustment.
default `z-index` is 30, change the `z-index` if you want some covered element to be shown.
[demo](http://chemzqm.github.io/mask/)
## Installation
Install with [component(1)](http://component.io):
$ component install chemzqm/mask
## API
```js
var Mask = require('mask');
var mask = new Mask();mask.show();
mask.hide();
```### new Make([el])
Default to document.body (cover the entire viewport if body is not scrollable).
Make sure element is positioned `relative` or `absolute` or `fixed`
### .spin([size | 60])
Enable a spin in the middle of mask.
### .show()
Show overlay.
### .hide()
Hide overlay.
## License
MIT