Do this with a background paste. I looked at the file modena.cssthat is available in jfxrt.jaron com.sun.javafx.scene.control.skin.modena. Your JavaFX project will definitely include this JAR, so feel free to browse the file yourself.
.button , , , , :
-fx-background-insets: 0 0 -1 0, 0, 1, 2;
: , , , . "bottom" sample.css, -1 0:
.button {
-fx-background-insets: 0 0 0 0, 0, 1, 2;
}
, , modena.css button:focus, CSS:
.root {
-fx-background-color: grey;
}
.button {
-fx-background-insets: 0 0 0 0, 0, 1, 2;
}
.button:focused {
-fx-background-insets: -0.2, 1, 2, -1.4, 2.6;
}
:

, - .
, , , :
.progress-bar > .bar
{
-fx-background-insets: 3 3 3 3;
}
.progress-bar > .track
{
-fx-background-insets: 0, 0 0 1 0, 1 1 1 1;
}
"" JavaFX: