After creating a canvas with HTML and setting the ratio to 16/9 in the CSS, I specified a width of 100vw and added a border. However, I noticed that the canvas appeared larger than expected on the screen.
#canvas{
width: 100vw;
aspect-ratio: 16/9;
border: 5px solid red;
}
To address this issue, I had to adjust the size and padding accordingly.
*{
margin: 5px;
margin-left: 3%
}
.canvas{
width: 80vw;
aspect-ratio: 16/9
border: 3px solid red;
}
Although this solution worked, I was hoping for a fullscreen display.
Screenshots:
https://i.sstatic.net/mt8Ys.png