开发者

Transform Properies in CSS

开发者 https://www.devze.com 2023-02-25 18:52 出处:网络
I want to rotate an image when i hover on it.I use the follwing code to开发者_如何学C rotate.Bui it doesn\'t works....

I want to rotate an image when i hover on it.I use the follwing code to开发者_如何学C 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消