开发者

How do I set a Xul window background image? Or, how to add a caption over a image?

开发者 https://www.devze.com 2023-01-17 08:43 出处:网络
I have a window in Xul, and I want to put a background image on it. I found nothing about the z-order, and the background-image and z-index in css is not working for the window.. any idea?

I have a window in Xul, and I want to put a background image on it.

I found nothing about the z-order, and the background-image and z-index in css is not working for the window.. any idea?

In the following test, the image is showing, but not as background. The image starts after the last caption.

My xul file:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://greenfox/content/tv.css" type="text/css"?>

<window id="mywindow" title="Test" width="640" height="480" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

        <caption label="secondary window"/>
        <caption label="secondary window"/>
        <caption label="secondary window"/>
        <caption label="secondary window"/>
        <caption label="secondary window"/>
        <caption label="secondary window"/>
        <caption label="secondary window"/>
        <caption label="secondary window"/>

        <image class="Wallpaper" src="images/plasma.jpg"/>

</wind开发者_JS百科ow>

My CSS:

.Wallpapaer {
    position:absolute;
    z-index: -1;
}


(an hour later) Found! Need to add all in a box component, and add background to the box class in css..

0

精彩评论

暂无评论...
验证码 换一张
取 消