简体   繁体   English

JavaFX 微调器 - 背景颜色

[英]JavaFX Spinner - Background Color

I have looked all over the forums and haven't found anything, maybe not using the right key words.我浏览了所有论坛,没有找到任何东西,可能没有使用正确的关键词。 Can someone assist me in styling this outer, border-like, part of javafx spinner via css.有人可以通过 css 帮助我设计 javafx 微调器的外部、边框状部分。 Thanks!谢谢!

javafx spinner with white border/bg color javafx 带白色边框/bg 颜色的微调器

  1. If you create a dark theme in your JavaFX application, you can use -fx-base in.root styling (in style.css) then you have all your JavaFX controls in dark:如果您在 JavaFX 应用程序中创建一个深色主题,您可以使用 -fx-base in.root 样式(在 style.css 中),那么您的所有 JavaFX 控件都处于黑暗状态:

    .root { -fx-base: rgba(60, 63, 65, 255); .root { -fx-base: rgba(60, 63, 65, 255); } }

  2. If you want to change the styling only for Spinner control, you can use -fx-base for.spinner in css:如果您只想更改 Spinner 控件的样式,可以在 css 中使用 -fx-base for.spinner:

    .spinner { -fx-base: rgba(60, 63, 65, 255); .spinner { -fx-base: rgba(60, 63, 65, 255); } }

Other css properties of the Spinner control you can find in modena.css.您可以在 modena.css 中找到 Spinner 控件的其他 css 属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM