jquery.imgbg DEMO3 (customize : image offset)

This is a demo sample of customizing offset position of image.

For example, if you put some content on upper of browser,
you might want to down background image position to dozens of pixels.

It will work not only top side but also left, right and bottom side offset.

Here is example to set Right side offset 100px and Bottom side offset 50px.

How to use

HTML (LOAD plugin)





HTML (image)




Setting example

$(function(){

  // this is default setting
  $("#demo").imgbg({
    top    : 0,
    bottom : 0,
    left   : 0,
    right  : 0
  });

  // No1: center of images. (default setting)
  $("#demo").imgbg({
    bottom : 50,
    right  : 100
  });

  // No1: you can set top/bottom/left/right
  $("#demo").imgbg({
    top    : 10,    // 10px from top side
    bottom : 20,    // 20px from bottom side
    left   : 30,    // 30px from left side
    right  : 40    // 40px from right side
  });

});