如何在JavaFX中的按钮上对CSS进行"闪耀"效果(见下图)?

jef*_*eff 6 css javafx button

这是我试过的css:

.button {
  -fx-background-radius: 4;
  -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.7), 10, 0, 0, 1);
  -fx-background-insets: 0, 1;
  -fx-padding: 5 20 5 20;
}
Run Code Online (Sandbox Code Playgroud)
<div class="button">Nouvea</div>
Run Code Online (Sandbox Code Playgroud)

这就是我想要的效果:

https://i.stack.imgur.com/E4zLV.png

JKo*_*dis 3

试试这个CSS:

#shinyButton{
    -fx-background-color: 
        #ECECEC,
        linear-gradient(#ECECEC 50%, #D5D5D5 100%),
        radial-gradient(center 50% -40%, radius 200%, #ECECEC 45%, #D5D5D5 50%);
    -fx-background-radius: 10;
    -fx-background-insets: 0,1,1;
    -fx-text-fill: black;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 3, 0.0 , 0 , 1 );
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

有关更多信息,请查看@Sedrick 在评论中给您的链接。