插代码 。。
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="/js/jQueryRotate.js"></script>
<title>Insert title here</title>
</head>
<body>
<div id="imgdiv" style="width: 200px;height: 300px;vertical-align: middle;margin-top: 100px;">
<input type="button" value="关闭" style="float: right;" onclick="closedImageDiv()"/>
<img id="image" alt="Penguins.jpg" src="Penguins.jpg" style="width: 200px;height: 300px;z-index: 0">
<input type="button" value="旋转90°" onclick="imagerotete()" style="float: right;">
</div>
</body>
<script type="text/javascript">
$(function(){
/* var angle = 0;
setInterval(function(){
angle += 3;
$("#image").rotate(angle);
}, 50); */
});
function imagerotete(){
var angle=0;
angle+=90;
if(angle>360){
angle=0;
}
$("#image").rotate({
angle: angle-90<0?0:angle-90,
animateTo: angle
});
}
function closedImageDiv(){
$("#imgdiv").remove();
}
</script>
</html>
![](https://i-blog.csdnimg.cn/blog_migrate/2d893be105a7f7e820b4bb18bc75a1cb.png)
附件列表