我想知道如何更改出现在文本区域中的内边框颜色。我想删除文本区域红色边框内的蓝色透明边框。我检查了 modena.css 文件,但找不到解决方案。
我的 css 文件中有什么:
.text-area:focused {
-fx-background-color: white;
-fx-border-color: rgba(229,0,0,0.3);
}
最佳答案
TextArea 的内容有额外的边框/背景。要更改/摆脱它,您需要在您的 css 中添加一个样式。
有点像
.text-area:focused .content {
-fx-background-color: white;
}
不确定这是否足够安全:它是 not documented (或者至少我找不到它的任何文档),仅作为实现可用,f.i.在提取的modena.css
关于带有 CSS 的 JavaFX TextArea 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51594560/