O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rotating images

Applying some effects to our images could be useful in order to achieve better user experience. One of the simplest effects that can be applied to images is rotation. We can rotate and grade an image on the screen of the device. This recipe explains how to apply this effect with only a little bit of CSS code.

Getting ready

The WebKit engine used by Safari Mobile defines specific properties for applying effects and simple transitions to HTML elements. We're going to use them directly; however, the iWebKit framework will be useful for defining an initial layout for our image. Be sure that you've installed this framework in your computer before continuing.

How to do it...

As you've seen in the previous recipe about how to display an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required