gpt4 book ai didi

javascript - 如何在 Electron 浏览器窗口中创建圆 Angular ?

转载 作者:太空宇宙 更新时间:2023-11-04 13:05:56 25 4
gpt4 key购买 nike

我到处搜索如何使我的浏览器窗口的 Angular 变圆。

如何实现圆 Angular ?

我试过让它透明。但没有任何效果。

她是我的代码:

/**
* we need to keep a global reference of the window object. If we don't, the
* window will be closed automatically when the js object is garbage collected
*/
let win

function createWindow () {
// Create the browser window.
win = new BrowserWindow({
width: 1800,
height: 1000,
frame: false,
transparent: true,
icon: __dirname + 'icon.png'
})

// and load the index.html of the app.
win.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
}))

// Open the DevTools.
win.webContents.openDevTools()

// Emitted when the window is closed.
win.on('closed', function () {
/**
* Dereference the window object, usually you would store windows in an
* array if your app supports multi windows, this is the time when you
* should delete the corresponding element.
*/
win = null
})
}

最佳答案

对于透明度,请尝试使用不透明度属性。范围从0到1

关于javascript - 如何在 Electron 浏览器窗口中创建圆 Angular ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41772425/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com