JSFiddle - React, Tailwind, and code Playground

by Lazaro Contreras

HTML

<canvas id="canvas"></canvas>

CSS

* {
  margin: 0;
  padding: 0;
}

#canvas {
  position: absolute;
}

JavaScript

var ctx = canvas.getContext("2d")
ctx.beginPath()
for (i = 1; i < 100; i++) {
  for (j = 1; j < 100; j++) {
    ctx.fillRect(i * 24 + 12, j * 14 + 7, 1, 1)
    if(i * 24 % 48 = 0)
    ctx.fillRect(i * 24, j * 14, 1, 1)
  }
}
ctx.stroke()