Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rotate a div Html layer?

I have a Div layer like this

...
<style type="text/css">
<!--
#newImg {
    position:absolute;
    left:180px;
    top:99px;
    width:704px;
    height:387px;
    z-index:1;
    background-image:url(../Pictures/repbg.png);
    background-repeat:repeat;

}

-->
</style></head>

<body>

<div id="newImg" name="newImg" ></div>
...

How to rotate it?

like image 649
Rella Avatar asked Mar 06 '26 23:03

Rella


2 Answers

You can use cssSandpaper to use the transform property which can be used to rotate elements in Gecko (Firefox), WebKit (Safari, Chrome), Opera and even Internet Explorer.

like image 160
Douwe Maan Avatar answered Mar 09 '26 14:03

Douwe Maan


This is a jQuery plugin that will rotate the image: http://code.google.com/p/jquery-rotate/

like image 34
Dustin Laine Avatar answered Mar 09 '26 14:03

Dustin Laine