Rotate Images with CSS

For an actual project I had a difficult quest. Images should be placed dynamically on a page and also should be dynamically rotated with different angels for different places. First I thought it would be the only solution to create new pictures with PHP, but than I found the information on how to rotate images with CSS.

The following code defines a CSS class for a rotated image:

For this example the picture is rotated by 5 degrees. If you want to rotate the image counter clockwise you can use also negative degrees (for example -5). As you can see, you need special functionality for different browsers.

(Visited 111 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *