<canvas id=‘test02‘></canvas> <script> var canvas = document.getElementById(‘test02‘); var context = canvas.getContext(‘2d‘); context.moveTo(50, 0); context.lineTo(0, 50); context.lineTo(50, 100); context.lineTo(100, 50); context.lineTo(50, 0); context.stroke(); </script>
时间: 2024-10-16 08:32:03