我想知道如何将我的矩形径向渐变(从Sketch生成)转换为javaFX。我不理解生成的草图CSS中的radial-gradient()
构造函数。
草图矩形:
生成的CSS:
background-image: radial-gradient(50% 108%, #40ADFF 50%, #1D94ED 100%);
border: 5px solid #1081D7;
box-shadow: 6px 2px 4px 1px rgba(0,0,0,0.49);
JavaFX CSS:
#myBtn{
-fx-background-color: radial-gradient(radius 50%, #40ADFF 50%, #1D94ED 100%);
-fx-border-color: #1081D7;
-fx-border-width: 5px;
-fx-border-style: solid;
-fx-effect: dropshadow(one-pass-box , black , 4,1,6,2);
}