Domanda

I wanted to test my webpage in chrome to see how it would look for different screen sizes. I changed the device metrics in the settings menu in developer tools window, but when I entered screen.availHeight and screen.availWidth into the console they showed my screen size not the changed sizes. These values are vital to my webpage, so I'm asking if there's any options to get the screen sizes for the changed device metrics?

È stato utile?

Soluzione

Try to use screen.width and screen.height instead. Worked for me

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top