<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
#myCanvas {
width: 100%;
height: 100vh;
display: block;
}
</style>
</head>
<body>
<canvas id="myCanvas"></canvas>
<script>
const canvas = document.getElementById('myCanvas')
canvas.setAttribute('width', document.body.clientWidth)
canvas.setAttribute('height', document
canvas制作小球碰撞效果(带连线功能)
最新推荐文章于 2024-08-19 07:48:35 发布