https://github.com/uppercod/bg-cover
It allows to adjust both image and video to the size with center/cover cut format 🔎
https://github.com/uppercod/bg-cover
Last synced: about 1 year ago
JSON representation
It allows to adjust both image and video to the size with center/cover cut format 🔎
- Host: GitHub
- URL: https://github.com/uppercod/bg-cover
- Owner: UpperCod
- Created: 2018-07-24T00:36:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-24T00:36:33.000Z (almost 8 years ago)
- Last Synced: 2024-10-04T09:18:52.158Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bg-cover
It allows to adjust both image and video to the size with center/cover cut format.
Allowing for example to set videos or background images scaled perfectly to the size of the contender
## cover(HTMLElement element)
The tags supported by bg-cover with **img** and **video**.
```js
import cover from "bg-cover";
let $el = document.querySelector("img");
cover($el);
```