0

Can you give me tips to create this animation in JavaFX?

animation

Or underline may move from left to right

My current .css file

.button{
    -fx-background-color:  rgba(0,0,0,0.1);
    -fx-shape:  "M 400 200 L 400 250 L 500 250 L 500 200 L 400 200";
}

.button .text {
    -fx-fill: white;
}

.button:hover .text {
    -fx-fill: #FFFF55;
}

.button:hover {
    -fx-background-color:  rgba(0,0,0,0.1);

}

zawww
  • 1
  • 1
  • 1
    You can't do this with JavaFX CSS, unfortunately. Might be able to in code though. – Slaw May 17 '22 at 21:21
  • See [this tutorial on animation and visual effect in JavaFX](https://docs.oracle.com/javase/8/javafx/visual-effects-tutorial/animations.htm), for info on how to write Java code to perform animations using JavaFX. Be prepared to do some work to get the effect you want if you want an exact match with the effect you demonstrated. – jewelsea May 17 '22 at 21:47

0 Answers0