On my webpage, I have the background image set with CSS, using the HTML selector. The background image is basically like a blueprint schematic background. (i.e. A white grid on a blue background.)
CSS:
html
{
display: block;
position: absolute;
background: url(../assets/background.jpg) repeat;
color: #FFF;
margin: 0px;
padding: 0px;
border: none;
}
When the end user clicks a button, I want the background image mentioned above to slide off the screen, towards the top-right direction, making the page appear to be going to a different area on the large blueprint schematic. I am using jQuery, but I cannot figure out how to access the background image from the CSS.
JavaScript:
$("#button").click(function()
{
// Animate the webpage's background, causing it to move
$("html /* Not sure what goes here */").animate({left: "-=10000px", top: "-=5000px"}, 1250);
});
I have tried using a div in the body that matches the width and height of the end user's screen, but a thick, white border appears around the blueprint schematic image, so I guess I will have to stick with adding the image through CSS, on the HTML selector.
How do I achieve the effect that I desire?