我创建了自己的标记来检查选择框中的项目,但是当我通过选择的选项时,默认的形状再次出现,我如何删除它?
.choice-box{
-fx-mark-color: transparent; /* OK */
}
.choice-box > .context-menu > .menu-item:checked > .left-container{
-fx-background-image: url('myMark.png'); /* OK */
-fx-background-repeat: no-repeat; /* OK */
}
.choice-box > .context-menu > .menu-item:checked:hover > .left-container{
-fx-background-color: red; /* OK */
}
.choice-box > .context-menu > .menu-item:checked:hover > .left-container > .mark{
-fx-background-color: transparent; /* Not work */
-fx-shape: none; /* Not work */
}
.choice-box > .context-menu > .menu-item:checked:hover > .left-container > .check{
-fx-background-color: transparent; /* Not work */
-fx-shape: none; /* Not work */
} 发布于 2016-01-31 23:16:55
访问标签标记的简单方法是使用-fx-focused-mark-color,因此完整的代码如下:
.choice-box{
-fx-mark-color: transparent; /* OK */
-fx-focused-mark-color: transparent; /* The solution! */
}
.choice-box > .context-menu > .menu-item:checked > .left-container{
-fx-background-image: url('myMark.png'); /* OK */
-fx-background-repeat: no-repeat; /* OK */
}
.choice-box > .context-menu > .menu-item:checked:hover > .left-container{
-fx-background-color: red; /* OK */
}https://stackoverflow.com/questions/35114018
复制相似问题