<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JS实现图片的旋转效果丨芯晴网页特效丨CsrCode.Cn</title>
<style type="text/css">
*{margin:0;padding:0;}
.item{float:left;border:5px solid #00469d;width:350px;}
</style>
</head>
<body>
<div class="item">
<input type="button" value="left" /><input type="button" value="right" /><br />
<img src="/images/m03.jpg" />
</div>
<div class="item">
<input type="button" value="left" /><input type="button" value="right" /><br />
<img src="/images/m02.jpg" />
</div>
<script type="text/javascript">
function Rotate(img){
this.init(img);
}
Rotate.prototype = {
constructor : Rotate,
init : function(img){
this.img = img;
this.initWidth = this.img.width;
this.initHeight = this.img.height;
if(!document.all || window.opera){
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载