可以有透明背景吗?
我想让用户桌面或他们打开的任何窗口通过背景显示,并带有一点不透明度。我在 Photoshop 中做了一个快速的模型来尝试说明我的目标,
如果需要的话,我可以使用一些 jQuery,但更愿意保持脚印较轻。我真的不想仅仅为了奇特的效果而增加大量的开销。
I'd like to have the users desktop or whatever windows they have open show through the background with a slight bit of opacity. I did a quick mockup in photoshop to try and illustrate what I'm aiming for
I'm fine with using a bit of jQuery if need be, but would prefer to keep the foot print light. I don't really want to add a ton of overhead just for a fancy effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
不可以。您不能使浏览器窗口变得半透明。
No. You cannot make the browser window translucent.
使用当前的 API,这是完全不可能的。从理论上讲,将来可能会实现这一功能,但目前,您能做的最好的事情就是对用户所需的颜色保持透明度。
This is completely impossible... using current APIs. It's theoretically possible that one might be implemented in the future, but for now, the best you can do is transparency to the user desired color.
我怀疑这是可能的,因为它要求实际的浏览器窗口是透明的,而这几乎肯定不是这种情况。
I doubt this is possible since it requires the actual browser window to be transparent, which is almost surely not the case.
也许使用一些浏览器插件,但不是通过您网站中的代码。
Maybe with some plugin for the browser, but not by code in your website.
不,这是不可能的。
99.99% 的情况下,如果您以前从未见过它,那么这是有充分理由的*。
*编辑:这些评论特定于网络编程...并不意味着适用于人类创新的总和。
No, this is impossible.
99.99% of the time, if you've never seen it before, there's a good reason*.
*EDIT: These comments are specific to web programming... not meant to apply to the sum total of human innovation.
该术语是“表单不透明度”,在大多数情况下,您必须有权访问应用程序源代码才能对其进行操作。一些程序已经将此作为标准或隐藏功能,例如 Trillian 和 iCalenderLite 等......Windows 7 允许您对任何打开的窗口执行此操作。
表单。不透明度
编辑:答案已被否决而没有评论,所以我在这里添加了OP和我的附加评论。
但这对于网站来说仍然是无法改变的吗? FREX 如果我的网站还没有打开表单不透明度(仅针对网站 X),我无法打开吗? – aslum Jun 7 '11 at 23:33
为此,我不得不说“不可能”,除非它是一个“实时”控件,由浏览器加载。您很可能无法仅在“按站点”的基础上进行操作。尽管大多数用户发起的事件“技术上”可以通过脚本或代码复制,但适当的安全级别将使此类事件无法被外部操纵。 – tahwos 2011-06-08 22:04
The term is
Form Opacity
, and you have to have access to the applications source code, in most cases to manipulate it. Several programs already have this as a standard or hidden feature, i.e. Trillian, and iCalenderLite, to name a couple.... Windows 7 allows you to do it to any open window.form.opacity
EDIT: Answer has been getting downvoted without comment, so I added the OP's and my additional remarks here.
Would this still be out of bounds for a website to change though? FREX I couldn't have my website turn form opacity on (just for site X) if it wasn't already? – aslum Jun 7 '11 at 23:33
For that, I would have to say "not possible", unless it was a "live" control, loaded by the browser to begin with. You most likely would not be able to do it on a "by site" basis only. And even though most user initiated events are "technically" replicable via script or code, proper security levels, would render such an event, inaccessible to outside manipulation. – tahwos Jun 8 '11 at 22:04
我发现很多事情都是不可能的。正确的答案目前几乎是不可能的;)使用编程,您可以创建透明的窗口或应用程序。我从未做过此类事情,但我使用过几个可以控制透明度的程序。
我控制窗口不透明度的最佳选择是 DirectX。因此,如果您要使用 DirectX 制作浏览器,您可以通过读取 CSS 来控制窗口的不透明度。
所以基本上,您可以自己做,就像 mozilla firefox 读取自己的 css (-moz-radius) 一样,只需制作您自己的基于 DirectX 的 Web 浏览器即可。我可以看到有人在这样的项目上得到了很多支持。
I am seeing a lot of this is impossible. The correct answer is currently mostly impossible ;) Using programming, you can create a window or application that is transparent. I have never done anything of the sort, but I have used several programs that allow you to control transparency.
My best bet for controlling opacity of a window is DirectX. So If you were to make a browser with DirectX, you could control the opacity of the window by reading the CSS.
So basicly, you could do it your self, much like mozilla firefox reads their own css (-moz-radius) just make your own DirectX based Web browser. I could see someone getting a lot of support on a project like that.