<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<canvas id="canvas" width="1000" height="600" style="border: 1px solid red;"></canvas>
<script type="text/javascript">
let canvas = document.getElementById('canvas');
let ctx = canvas.getContext('2d');
let width = canvas.width;
let height = canvas.height;
let i = 0, j = 0;let a = 0, b= 0;
// let img = new Image()
// img.src = 'img/ez.jpg'
// img.onload = function() {
// setInterval(function(){
//
//
//
// if(i == 4){
// i = 0;
// j++;
// }
//
// if(j == 1 && i == 2){
// j = 0
// }
// i++;
// ctx.drawImage(img, 185*i, 94*j, 185, 94,
canvas画动图与移动
最新推荐文章于 2023-11-15 16:20:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)