FeedBurner FeedCount

Wednesday, December 18, 2013

How to rotate an image by rui santos



How to rotate an image by rui santos




1st do a simple html file with image;

<html>
    <head>
        <title>Rotate my Image</title>
        <link rel="stylesheet" type="text/css" href="rotate_style.css" />
    </head>
  
    <body>
        <img src="5.png" alt="myImage">
    </body>
</html>

Then: do the rotate_style.css

 img{
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
transition-duration: 0.8s;

height: 450px;
width: 450px;

-webkit-transition-property: transform;
-moz-transition-property: transform;
transition-property: transform;
}
img:hover{
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
height: 900px;
width: 900px;
}

After this code. run index.html in your browser and hover the image. ENJOY! ^_^




rui santos