javascript - CSS moving background image -


I have a tiled background image, which looks like a grid. tiled background image

Question:

I was just thinking that it is possible to carry the image of tiles while using CSS that is being done to fulfill this effect. However, the image also requires full width of the screen and the duration of the height.

Tiled image:

tile Image

Current CSS:

  #background {status: fixed; Width: 100%; Height: 100%; Background color: # 7abcff; / * Older browser * / background-image: url ('' .// picture / background.jpg '); }   

When you press the up / down arrow, or use the pan tool in the upper right corner, I adjust the CSS gradient value.

Solution: Using jQuery and CSS background-position:

  $ ('# background'). Attr ("Style", "Background-Position:" + this._bgL + 'px' + This._bgT + 'px');    

You can use to move the background image.

Here it is: (Try changing the background-position property and clicking "Run")

Comments