问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/5181039/how-to-make-a-50-transparent-window