Quantcast
Viewing all articles
Browse latest Browse all 215

Image Rotate Hover Effect Using CSS and HTML

Image Hover effects using CSS have been quite famous in web developing and pretty handy in giving attractive looks to your site. This is yet another image hover effect using simple CSS and HTML. This one is called as photo rotate effect in which the image will undergo rotations and display it at a tilted angle giving the look of a cool photo rotate hover effect. This kind of effect is well suited for galleries in your site and integrating this effect with other images will give a classy look to your site. You can check the demo of this effect in this Demo effects collection page. Note that some of the effects may not work as you desired in this page but it will 100% clean if you implement it separately.

PREVIEW OF THIS HOVER EFFECT:



Here is a simple preview of this photo rotate hover effect and in this the images should be carefully placed to avoid the overflow of images over one another. It should also be properly aligned to keep the attraction of this effect intact.


CSS CODE:

  1. #photo_rotate img{
  2.        width: 400;
  3.        height:400;
  4.        -moz-border-radius: 50%;
  5.        -webkit-border-radius: 50%;
  6.        border-radius: 50%;
  7.       -webkit-transition: all 0.3s ease;
  8.       -moz-transition: all 0.3s ease;
  9.       transition: all 0.3s ease;
  10.       padding:4px;
  11.       border:1px solid #000 !important;
  12.                           }
  13. #photo_rotate img:hover {
  14.        border-radius: 0 0 0 0;
  15.        -moz-transform: scale(1.2) rotate(-711deg) ;
  16.        -webkit-transform: scale(1.2) rotate(-711deg) ;
  17.        -o-transform: scale(1.2) rotate(-711deg) ;
  18.        -ms-transform: scale(1.2) rotate(-711deg) ;
  19.        transform: scale(1.2) rotate(-711deg) ;
  20.                                         }
In the above code rotate property was used to produce this cool hover effect. You can assign the rotate degree values of your wish but in here -711 deg was used to make the image rotate anticlockwise and the image rotation stops before completion of 2nd rotation. Border radius was given as 50% to alter the shape of the image to a circle. You can alter these values to change the effect produced and careful placement of images is necessary to avoid overlapping of images over one another. 


HTML CODE:

  1.  <div id="photo_rotate">
  2. <img src="Your image URL"></img>
  3. </div>
HTML part of this code is pretty simple in nature all you have to do is place the images inside a <div> tag with id "Photo_rotate" in it.

I hope this effect will be useful to you and your site. Share this effect with others through social sites if you like it.  Feel free to post your comments and queries regarding this article with us , we are happy to help you regarding this. Thanks for visiting us and Happy coding.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 215

Trending Articles