Anish
Anish

Reputation: 2917

Transform Properies in CSS

I want to rotate an image when i hover on it.I use the follwing code to rotate.Bui it doesn't works....

#header #scn:hover{transform:rotate(45deg)};

It doesn't works for me.I am using Firefox 4.

Is there any way to perform transform and shadow effects in IE8.

Upvotes: 0

Views: 2307

Answers (1)

benjy
benjy

Reputation: 986

You need to add a prefix for every rendering engine. For Firefox the prefix is -moz-.

To rotate an image in all supported browsers use:

-moz-transform: rotate(45deg); 
-o-transform: rotate(45deg); 
-webkit-transform: rotate(45deg); 
-ms-transform: rotate(45deg); 
transform: rotate(45deg);

For text shadows in IE8 you can use Shadow Filter (MSDN). Plus there is CSS transforms workaround for Internet Explorer: cssSandpaper.

Upvotes: 1

Related Questions