gpt4 book ai didi

css - 标题 Pane css 设置

转载 作者:技术小花猫 更新时间:2023-10-29 11:13:37 25 4
gpt4 key购买 nike

我想知道如何将 CSS 设置应用于 TitledPane,但找不到任何示例

我想为 TitledPane 工具栏和背景应用自定义设置,但这不起作用

.titled-pane
{
-fx-background-color: linear-gradient(aliceblue, lightslategray);
}

最佳答案

带标题 Pane 的默认 css...根据您的需要进行更改。

.titled-pane 
{
-fx-skin: "com.sun.javafx.scene.control.skin.TitledPaneSkin";
-fx-text-fill: -fx-text-base-color;
}
.titled-pane:focused
{
-fx-text-fill: white;
}
.titled-pane > .title
{
-fx-background-color: -fx-box-border, -fx-inner-border, -fx-body-color;
-fx-background-insets: 0, 1, 2;
-fx-background-radius: 5 5 0 0, 4 4 0 0, 3 3 0 0;
-fx-padding: 0.166667em 0.833333em 0.25em 0.833333em; /* 2 10 3 10 */
}

.titled-pane:focused > .title
{
-fx-color: -fx-focus-color;
}

.titled-pane > .title > .arrow-button
{
-fx-background-color: null;
-fx-background-insets: 0;
-fx-background-radius: 0;
-fx-padding: 0.0em 0.25em 0.0em 0.0em; /* 0 3 0 0 */
}

.titled-pane > .title > .arrow-button .arrow
{
-fx-background-color: -fx-mark-highlight-color, -fx-mark-color;
-fx-background-insets: 1 0 -1 0, 0;
-fx-padding: 0.25em 0.3125em 0.25em 0.3125em; /* 3 3.75 3 3.75 */
-fx-shape: "M 0 0 h 7 l -3.5 4 z";
}

.titled-pane:collapsed > .title > .arrow-button .arrow
{
-fx-rotate: -90;
}

.titled-pane > *.content
{
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-color,-02%), derive(-fx-color,65%) 12%, derive(-fx-color,23%) 88%, derive(-fx-color,50%) 99%, -fx-box-border);
-fx-background-insets: 0, 0 1 1 1;
-fx-padding: 0.167em;
}

.titled-pane:focused > .title > .arrow-button .arrow
{
-fx-background-color: white;
}

关于css - 标题 Pane css 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21451386/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com