问题描述
我试图做一个半透明的窗口。这是我的尝试:$ b
<?xml version =1.0?>
<?xml-stylesheet href =chrome:// global / skin /type =text / css?>
< window width =400height =300
style = - moz-appearance:none;
background:rgba(255,255,255,0.5 );
filter:alpha(opacity = 50);
opacity:0.5;
-moz-opacity:0.5;
xmlns =http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul>
< label value =MAIN WINDOW/>
< / window>
尽管窗口上的文字是透明的,但窗口本身并不是。
$ b
我读过它只适用于panel,而不是windows,所以我用< panel>
和< window>
但是没有一个变得透明。
我试过了,,以及。但是没有任何工作。
有什么想法吗?
我刚刚意识到在拖动Firefox 3.6.10 ,它显示一个透明的窗口。我只是需要知道现在是怎么做的。
我做了一些揣测,发现,即使对于Gecko 2也不能修正。所以在Linux上是不可能的。 p>
I'm trying to do a semi-transparent window. There's my attempt:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window width="400" height="300"
style="-moz-appearance: none;
background: rgba(255, 255, 255, 0.5);
filter:alpha(opacity=50);
opacity: 0.5;
-moz-opacity:0.5;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<label value="MAIN WINDOW"/>
</window>
Although the text on the window is transparent, the window itself is not.
I've read that it works only for panels, not windows, so I tried it with both <panel>
and <window>
but none of then become transparent.
I've tried the approaches used here, here, and here. But nothing works.
Any idea?
I just realized that while dragging a tab in Firefox 3.6.10, it shows a transparent window. I just need to know how it's done now.
I did a bit of poking around and found bug 408284, which sadly isn't fixed even for Gecko 2. So it's not possible on Linux.
这篇关于如何制作一个50%的透明窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!