JSFiddle - React, Tailwind, and code Playground

by Ryan Brackett

CSS

html {
  height: 100vh;
}

body {
  background: black;
  height: 400vh;
}

canvas {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-height: 100vh;
  max-width: 100vw;
  background: white;
}

JavaScript

const html = document.documentElement;
const canvas = document.querySelector()