What I want to do is that I want to check if the program takes up any less space than the whole screen. If so, I will enable the horizontal and/or vertical scrollbar accordingly by using the overflow
property in css.
But how do I get the electron app dimensions? I already know how to get the screen dimensions.
In advance, Thanks :)
You could use the innerWidth
and innerHeight
properties of window
:
let width = window.innerWidth;
let height = window.innerHeight;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.