开发者

FF extension XUL image display

开发者 https://www.devze.com 2023-02-15 07:37 出处:网络
If I want to show an image in my sidebar. How can I do that? I tried to do the following to no avail:

If I want to show an image in my sidebar. How can I do that? I tried to do the following to no avail:

According to this: https://developer.mozilla.org/en/XUL_Tutorial/Adding_Labels_and_Images

If I add this code into my ff-sidebar.xul file:

XUL:
 <image开发者_如何学编程 id="image1"/>

Style Sheet:
 #image1 {
   list-style-image: url("chrome://findfile/skin/banner.jpg");
 }

The Image should be displayed. Did I pick the wrong file?

best, US


That's an example if your extension is registered in chrome with findfile:

These images come from within the chrome directory, in the skin for the findfile package.Because images vary by theme, you would usually place images in the skin directory.

And in introduction to the tutorial it says:

This tutorial will demonstrate creating a simple find file user interface, much like that provided by the Macintosh's Sherlock or the find file dialog in Windows.

So that example is in the context of the tutorial.

You need to provide it an image in your skins folder and in css use:

list-style-image: url("chrome://yourext/skin/yourfilename.jpg");
0

精彩评论

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