Answer the question
In order to leave comments, you need to log in
How to adjust the width and height of the canvas for the browser?
I'm just starting to explore the vast expanses of canvas and it's not clear how to make the canvas adapt to the browser. If I understand correctly, without specifying a specific size, you can make it "cross-sized".
Please provide an example if possible.
PS I know how to use Google. That's what I didn't find.
Answer the question
In order to leave comments, you need to log in
If you do not specify the size, then by default it is like 150 by 100 pixels.
You need to resize yourself when the window resizes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question