JSFiddle - React, Tailwind, and code Playground

HTML

<canvas></canvas>

<p>Showing how to use CSS to set a background image to a canvas.</p>
<p>Drawing on the canvas overlays on this image, and clearing the canvas does not include it. Basically the background is not part of the canvas, but always tiled behind it.</p>
<p><em>(The image I'm using here&mdash;<img src="http://phrogz.net/tmp/grid.gif">&mdash;is not a great grid for your needs, but it's one that I happened to have available :). Use your own image as desired for a better effect.</em></p>

CSS

canvas { background-image:url(http://phrogz.net/tmp/grid.gif) }

body { margin:1em }
p    { margin:1em 0 }
em   { font-style:italic }