JSFiddle - React, Tailwind, and code Playground
by Christopher
HTML
<div id="one">
<canvas id="drawingCanvas" width="500" height="400"></canvas>
</div>
CSS
#one #drawingCanvas {border: 6px dashed black;}
JavaScript
var canvas = document.getElementById("drawingCanvas");
var context = canvas.getContext("2d");
function animFrame() {
context.beginPath();
context.rect(squarePosition_x, squarePosition_y, 10,10);
context.lineStyle = "black";
context.lineWidth = 1;
context.stroke();
}
animFrame()