Tip: you can modify some code before running
Images rotated back and forth by js special effects<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Images rotated back and forth by js special effects</title><meta http-equiv="content-type" content="text/html;charset=gb2312"><!--把下面代码加到<head>与</head>之间--><style type="text/css">Body {background: black} # p1 {position: absolute; height: 75px; top: 200px ;}</style><script type="text/javascript">Var left = 200; var img = document. getElementById ('p1'); var imgWidth = 300; var pi = Math. PI; var x = 0, temp = 0; function init () {document. getElementById ('p1 '). style. left = left + 'px '; var set = setInterval ('Goon ()', 50);} function goOn () {temp = Math. cos (x); document. getElementById ('p1 '). style. width = Math. abs (imgWidth * temp) + 'px '; document. getElementById ('p1 '). style. left = (left + (imgWidth-Math.abs (imgWidth * temp/2) + 'px '; if (temp <0) {document. getElementById ('p1 '). style. filter = 'fliph (enabled: true) ';} else {document. getElementById ('p1 '). style. filter = 'fliph (enabled: false) ';} x + = pi/90 ;}</script></head><body><!--把下面代码加到<body>与</body>之间--><div id="imground"></div><script type="text/javascript">Init ();</script></body></html>
Tip: you can modify some code before running