用&#106avascript使网页图片产生旋转效果

王朝html/css/js·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

Rotation滤镜可以使图片产生旋转效果,注意必须是IE5.5及IE6.0才能看到!

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<style>

body img{border:3 gold ridge}

</style>

//给图片加上边框的CS代码

<title>用Javascript使网页图片产生旋转效果</title>

<script language="javascript">

var i=0;

function playImg()

{

image.style.filter="progid:DXImageTransform.Microsoft.BasicImage( Rotation="+i+")";

i++;

if (i>4)

{i=1};

mytimeout=setTimeout("playImg()",1500);

}

</script>

//以上是使图片实现四个方向转换的代码

</head>

<body bgcolor="#FFFFFF" text="#000000" onload="playImg()">

//修改body为加载就显示效果

<img src="/img/200406301.jpg" width="120" height="120" name="image">

</body>

</body>

</html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<style>

body img{border:3 gold ridge}

</style>

<title>用Javascript使网页图片产生旋转效果</title>

<script language="javascript">

var i=0;

function playImg()

{

image.style.filter="progid:DXImageTransform.Microsoft.BasicImage( Rotation="+i+")";

i++;

if (i>4)

{i=1};

mytimeout=setTimeout("playImg()",1500);

}

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000" onload="playImg()">

<img src="/img/200406301.jpg" width="120" height="120" name="image">

</body>

</body>

</html>

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航