JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<p>Hello, world. Hello, world.</p>
<canvas width="100" height="100"></canvas>
</div>
CSS
* {
margin: 0;
padding: 0;
}
div {
transform: scale(10);
transform-origin: left top;
}
JavaScript
var canvas = document.getElementsByTagName('canvas')[0];
var context = canvas.getContext('2d');
setTimeout(function() {
context.fillRect(0, 0, 1, 1);
}, 1000);