如何制作一个50%的透明窗口? [英] How to make a 50% transparent window?

查看:144
本文介绍了如何制作一个50%的透明窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做一个半透明的窗口。这是我的尝试:
$ 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 ,它显示一个透明的窗口。我只是需要知道现在是怎么做的。

解决方案

我做了一些揣测,发现 bug 408284 ,即使对于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%的透明窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆