Skip to content
This repository

gniusBackground resizes the Background image depend on its aspec ratio and with a focus point. (focus point is now the center of the image)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Source
Octocat-spinner-32 README.md
Octocat-spinner-32 package.yml
README.md

gniusBackground

gniusBackground resizes the image in full-screen with aspec ratio depended on its browsers window size. It also has options to be scrollable or fixed.

Screenshot

How to use

Just add this Code below in each section.

Javascript:

new gniusBackground('myElement',{
    scrollable  : false,
    width       : 894,
    height      : 894
});

HTML:

<div id="myElement">
    <img src="yourImageHere" />
</div>

CSS:

#myElement{
    top         : 50%;
    left        : 50%;
    z-index     : 1;
}
Something went wrong with that request. Please try again.