Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top