<!DOCTYPE html>
<html>
<head>
<title>图片旋转</title>
<script>
window.onload = function(){
var current = 0;
document.getElementById('rotate').onclick = function(){
current = (current+90)%360;
this.style.transform = 'rotate('+current+'deg)';
}
};
</script>
</head>
<body>
<img id ="rotate" src="">
</body>
</html>
JS实现图片旋转90度
最新推荐文章于 2024-08-18 19:51:40 发布