I'm creating an application where user can rotate his mobile but the image inside web page will rotate in anti direction so it will seems to be still.
var rotate = 0 - window.orientation;
image.style.transform = "rotateZ("+ rotate * (Math.PI/180) +"deg)";