请问有没有动态设置位置或将浏览器窗口移动到右下角的方法?
BrowserWindow.setPosition(x, y)
最佳答案
您可以使用 the screen API ,并使用 fixed with 从屏幕边缘偏移:
let display = electron.screen.getPrimaryDisplay();
let width = display.bounds.width;
win = new BrowserWindow({
width: 600,
x: width - 600,
y: 0
});
关于javascript - 将 BrowserWindow 移动到右下角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49354526/