Coverer
Installation
npm install coverer
Usage
// selector is an element selector (e.g., #element).// aspectRatio is defined as width / height.Coverer;
import
; Coverer;
require
const Coverer = Coverer; Coverer;
script element
<script src="somewhere/coverer.min.js"></script><script> Coverer;</script>
Notes
This does not automatically make the selected element to be non-interactable nor does it set the z-index to some value. This is done on purpose in case the user wants the element to be interactable and/or if they want to set a custom z-index value.