gniusBackground

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

View the Project on GitHub MrIsaacs/gniusBackground

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;
}