<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
canvas{
display: block;
margin: auto;
border: 1px solid #CCC;
}
.buttons{font-size: 0px;}
button{
width: 20%;
height: 50px;
}
</style>
<title>2d 正方形旋转</title>
</head>
<body onselectstart="return false">
<button onmouseenter="if(this.innerHTML=='顺时针'){cw=false;this.innerHTML='逆时针';}else{cw=true;this.innerHTML='顺时针';}" >顺时针</button>
<div class="buttons" >
<button onmouseenter="rotate(0);" onmouseout
html canvas 2d 正方形 顺时针逆时针 四个角度旋转
最新推荐文章于 2022-04-26 23:07:41 发布