简体   繁体   中英

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

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"/>

</window>

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..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM