I tried to rotate an image in javascript using the new Image()
I tried with this:
this.gunner = new Image()
this.gunner.src = *url*
this.gunner.style.WebkitTransform = "rotate(20deg)"
but the image still was like normal.
How can I do this?
I tried to rotate an image in javascript using the new Image()
I tried with this:
this.gunner = new Image()
this.gunner.src = *url*
this.gunner.style.WebkitTransform = "rotate(20deg)"
but the image still was like normal.
How can I do this?
Try this:
var image = new Image();
image.src = 'http://placehold.it/350x150';
document.body.append(image);
image.style.transform = "rotate(90deg)";