nw.js实现圆角阴影效果
预览效果

index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Hello World by HTML!</title>
<style>
html {
height: 100%;
}
html, body {
padding: 0;
margin: 0;
-webkit-app-region: drag;
overflow: hidden;
}
.nb-boder-shadow {
-webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, .9);
background: transparent;
border-radius: 20px;
position: fixed;
left: 20px;
top: 20px;
bottom: 20px;
right: 20px;
}
.main {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
padding: 20px;
background-color: #ffffff;
}
</style>
</head>
<body class="nb-boder-shadow">
<div class="main">
Hello World, lobtao@qq.com
</div>
</body>
<script>
</script>
</html>
package.json
{
"main": "index.html",
"name": "HelloWorld",
"nodejs": true,
"single-instance": true,
"window": {
"title": "HelloWorld",
"width": 800,
"height": 600,
"icon": "logo.png",
"position": "center",
"min_width": 0,
"min_height": 0,
"max_width": 0,
"max_height": 0,
"resizable": false,
"always_on_top": false,
"fullscreen": false,
"show_in_taskbar": true,
"frame": false,
"show": true,
"kiosk": false,
"transparent": true
},
"webkit": {
"plugin": true
}
}

浙公网安备 33010602011771号