Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在electron应用程序中创建圆角_Html_Css_Node.js_Electron - Fatal编程技术网

Html 如何在electron应用程序中创建圆角

Html 如何在electron应用程序中创建圆角,html,css,node.js,electron,Html,Css,Node.js,Electron,角上始终有白色边框间隙,使其成为矩形 已尝试增加css的边框大小,但所有内容都会扩展。关键属性是:frame:false和transparent:true(您错过了后者) js html 这方面的关键属性是:帧:false和透明:true(您错过了后者) js html 车身上是否使用“透明”背景?(就像我的例子中默认的那样)transparent:true只允许你的html是真正透明的。另外,我可以问一下,为什么当我把fullscreenable:false放进去时,它仍然可以

角上始终有白色边框间隙,使其成为矩形


已尝试增加css的边框大小,但所有内容都会扩展。

关键属性是:
frame:false
transparent:true
(您错过了后者)

js

html



这方面的关键属性是:
帧:false
透明:true
(您错过了后者)

js

html



车身上是否使用“透明”背景?(就像我的例子中默认的那样)
transparent:true
只允许你的html是真正透明的。另外,我可以问一下,为什么当我把fullscreenable:false放进去时,它仍然可以作为完整的html打开screen@HarF-你所说的“它仍然可以全屏打开”是什么意思。到目前为止,我对此没有任何问题。它会正确禁用
win.setFullScreen
调用。有了更多的细节,你就可以开始一个新问题了!;)你们在身体上使用“透明”背景吗?(就像我的例子中默认的那样)
transparent:true
只允许你的html是真正透明的。另外,我可以问一下,为什么当我把fullscreenable:false放进去时,它仍然可以作为完整的html打开screen@HarF-你所说的“它仍然可以全屏打开”是什么意思。到目前为止,我对此没有任何问题。它会正确禁用
win.setFullScreen
调用。有了更多的细节,你就可以开始一个新问题了!;)
const electron = require("electron");
const {app, BrowserWindow, globalShortcut} = electron;
const path = require("path");

function createWindow(){
    win = new BrowserWindow({
        width: 1000, 
        height: 750, 
        icon: path.join(__dirname,'\checked.png'),
        frame: false,
        fullscreenable:false,
        // radii: [5,5,5,5],
        // transparent:true

    });

    win.loadFile('mainWindow.html')
    win.setMenu(null);
}
const {app, BrowserWindow} = require('electron')
const path = require('path')

app.once('ready', () => {
  let win = new BrowserWindow({
    frame: false,
    transparent: true
  })
  win.loadURL(path.join(__dirname, '/roundedcorner.html'))
})
<html>
  <body>
      <p style="border-radius: 25px; background: #73AD21; height: 300px;"></p>
  </body>
</html>