Background command
Do you need an image that scales to the whole of the browser window, at all times? With or without distortion? Than this one’s for you.
Basic Usage (HTML)
data-jkit="[background]"
Advanced Init (JavaScript)
$('#myelement').jKit('background', { });
Options
Option | Values | Default | Description |
---|---|---|---|
distort | “yes” or “no” | no | Distort the image if needed to fit into the window or just scale it? |
Events
Event | Description |
---|---|
resized | Triggered whenever the window is being resized |
Examples
Non distorted:
The background on this page (always set the width and height of the applied image!):
Source:
<img data-jkit="[background:distort=no]" id="bg" src="../img/jkit_bg.jpg" width="1920" height="1080">
Replacements
There are currently no replacements for this command.
[ Learn more about replacements ]
Discussions
Do you have questions or do you want to suggest new features? Than head over to our new community:
[ jKit Community ]