+ 2

How to make canvas fit the window of each device?

Hey guys, tried to create a basic game - https://code.sololearn.com/WyUpNTvsJrq5/#html and it looks good on the SoloLearn page. In the iOS and Android apps the canvas doesn't fit to the screen of the device. So, is there a way to make it to automatically fit the screen? Thanks in advance :)

5th Sep 2018, 9:05 AM
MarJan
MarJan - avatar
2 Respuestas
+ 4
add this to your HTML code <meta name="viewport" content="width=device-width, initial-scale=1.0">
5th Sep 2018, 4:48 PM
patos
patos - avatar
+ 1
patos it didn’t work :/
6th Sep 2018, 7:14 AM
MarJan
MarJan - avatar