我的xul应用程序中有这个树结构。
<tree>
<treechildren>
<treeitem>
<treerow>
/* some code */
</treerow>
<treechildren>
<treeitem> /* some code */</treeitem>
<treeitem> /* some code */</treeitem>
</treechildren>
</treeitem>
</treechildren>
</tree>
正如xul gurus已经知道的那样,包含treechildren的treeitem会从标签中留下一个箭头。像这样:
我想知道的是如何更改此箭头并将其放置在最右侧。
答案 0 :(得分:1)
此箭头称为“曲折”,并使用-moz-tree-twisty
pseudo-class设置样式。默认的Windows主题为树曲调定义了以下样式:
treechildren::-moz-tree-twisty {
-moz-padding-end: 4px;
padding-top: 1px;
width: 9px; /* The image's width is 9 pixels */
list-style-image: url("chrome://global/skin/tree/twisty-clsd.png");
}
treechildren::-moz-tree-twisty(open) {
width: 9px; /* The image's width is 9 pixels */
list-style-image: url("chrome://global/skin/tree/twisty-open.png");
}
通过覆盖这些样式,您可以更改其宽度和边距,还可以使用其他图像。但是,我认为你不能把它移到另一个位置。