Call an image in Javascript from address bar? -


i don't know javascript, shouldn't hard. in css there little trick move image around on site, with

background: url(http://site.com/image.png) no-repeat 16px 25px; 

and it'd draw image 16 pixels on , 25 pixels down. wondering if there way in javascript play around other sites little.

yes can:

document.getelementbyid('something').style.backgroundposition="10px 50px" 

or use variables:

var x = 10; var y = 50; document.getelementbyid('something').style.backgroundposition= x + "px" + y + "px"; 

....then can run animation loop or whatever.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -