JSFiddle - React, Tailwind, and code Playground

by andersand

HTML

<div id="">
<canvas id="canvasSection">Error, canvas is not supported</canvas>
</div>
<div id="content">TestText</div>

CSS

#canvasSection {
    position:absolute;
    top:0;
    left:0;
    z-index: 1;
}

#content {
    z-index: 10;
    position:relative;
}

JavaScript

$(document).ready(function() {
    var canvas = document.getElementById('canvasSection');
    var ctxSquare = canvas.getContext('2d');
    ctxSquare.fillStyle='#999999';
    ctxSquare.fillRect(0, 0,30,30);
});