2011-04-08 83 views
0

我想在側邊欄中顯示圖像數組。圖像應該是可點擊的。這是我在我的FF-sidebar.xul文件,到目前爲止,但沒有顯示:側邊欄中的Firefox擴展圖像顯示

<?xml version="1.0"?> 
<?xml-stylesheet href="chrome://global/skin/" type"text/css" ?> 
<!DOCTYPE page SYSTEM "chrome://pos/locale/overlay.dtd"> 

<page id="posSidebar" title="&posSidebar.label;" 
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 

<script src="ff-sidebar.js"/> 
<script src="ff-sidebar.css"/> 

<vbox flex="1"> 
    <label value="&posSidebar.label;" /> 
<image id="image1"/> 
</vbox> 
</page> 

和CSS文件的代碼:

#image1 
{ 
list-style-image: url("chrome://myextension/skin/images/1.png" width='135' height='130'); 
} 

回答

0

爲什麼你想在加載您CSS文件作爲腳本?也是腳本聲明應該是這樣的:

<script type="application/x-javascript" src="chrome://rehostimage/content/password_manager.js" /> 

至於顯示出來圖像,你嘗試過

<image src="chrome://myextension/skin/images/1.png" />