0

我想再次开始为 Windows 开发 HTML 桌面应用程序。我还没有决定要在哪个框架上构建它,所以我对此相当灵活。现在..我有一个要求:在我要创建的两个应用程序中,我希望有一个透明背景,这不仅是透明的,而且还会模糊它下面的内容 - 类似于你得到的所有效果通过 OSX Yosemite 和最新的 iOS

这里可以看到一张我大致想要达到的效果图:https ://d13yacurqjgara.cloudfront.net/users/107587/screenshots/1598097/vk_os_x_player_dribbble.png

现在,有没有人知道如何在......比如说...... AppJS 或 Chrome 打包应用程序或使用 TideSDK 或 node webkit 来实现这一点?

编辑 - 当我尝试用 AppJS 程序做建议的事情时,我只是得到一个黑色的背景。不是透明的。我想我也知道如何在浏览器中实现这一目标。但不是在应该在桌面上运行的应用程序中。

4

2 回答 2

0
#myDiv {
-webkit-filter: blur(20px);
-moz-filter: blur(20px);
-o-filter: blur(20px);
-ms-filter: blur(20px);
filter: blur(20px);
opacity: 0.4;
}
于 2015-01-06T16:52:31.650 回答
0

Windows has a native method that accepts a window handle and allows you to achieve the blur you're looking for. See this example on how to use the method in C/C++. If you want to be able to call this from node-webkit code, then you'll likely need to use node-ffi to get the job done.

Even with both of these things, I have never personally tried to access the window handle for a window created by node-webkit, so I don't even know how easy/difficult/possible it actually is, but I hope that this at least gets you started.

于 2015-01-17T06:16:29.860 回答