Why my CSS is not working with the XUL app?
My xul app:
<?xml version="1.0"?>
<?xml-stylesheet href="main.css" type="text/css"?>
<window id="main" title="MY TEST" width="640" height="480" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<listbox id="mainList">
<listitem label="Butter Pecan"/>
<listitem label="Chocolate Chip"/>
<listitem label="Raspberry Ripple"/>
<listitem label="Squash Swirl"/>
</listbox>
</window>
开发者_Go百科The main.css:
body {background-color:#b0c4de;}
and the result is a transparent window, why the color is not filling?
I know nothing about XUL, but I would assume that the style isn't working because there isn't a body tag in your XUL code.
Try this:
#main {background-color:#b0c4de;}
精彩评论