更改图标后,旋转不再适用于Internet Explorer和Firefox,但在其他浏览器中也可以。
以下是page
以下是source
js:
<script language="JavaScript">
<!--
var position = "up";
function rotate()
{
if (position == "right"){
current_image.className = 'rotate_down BigPicture';
position = "down";
}
else if(position == "down"){
current_image.className = 'rotate_left BigPicture';
position = "left";
}
else if(position == "left"){
current_image.className = 'rotate_up BigPicture';
position = "up";
}
else if(position == "up"){
current_image.className = 'rotate_right BigPicture';
position = "right";
}
}
//-->
</script>
css:
<style>
.rotate_left
{
transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
-o-transform: rotate(270deg);
}
.rotate_right
{
transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
-o-transform: rotate(90deg);
}
.rotate_up
{
transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
}
.rotate_down
{
transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
-o-transform: rotate(180deg);
}
</style>
此代码有效但与文档中的其他代码(在所述浏览器中)崩溃。