How to make a 50% transparent window?

你说的曾经没有我的故事 提交于 2019-12-12 05:35:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!