I want to make a browser window like:
I picked out this image from https://tailwindcss.com/
How do I make a responsive browser window that shrinks & grows when you resize the Chrome Browser's window in Canvas?
Note: I don't want to make the browser window's width equal to window.innerWidth
. I want it to have size 1024*600
& maintain an aspect ratio of 16 / 9
.
I can't figure out the math. I also can't use Maintain the aspect ratio of a div with CSS as there is no padding bottom to be used.
I even read https://css-tricks.com/aspect-ratio-boxes/ but it's not what I want.
I have width
, height
& aspectRatio
& want to make a resposive rectangle without using padding-bottom
.