kendo ui角度分裂面板改变背景颜色

问题描述 投票:0回答:1

我试图改变kendo-splitter-pane的背景颜色。但是,即使我向其添加样式标记,它似乎也不适用于其内部元素。

那么为kendo-splitter-pane定制颜色的适当方法是什么?

css angular kendo-ui
1个回答
1
投票

你需要在background-color元素上应用kendo-splitter-pane,如下所示:

@Component({
    selector: 'my-app',
    template: `
        <kendo-splitter style="height: 200px;">
            <kendo-splitter-pane class="pane1">
                <h3>Left pane</h3>
            </kendo-splitter-pane>

            <kendo-splitter-pane>
                <h3>Center pane</h3>
            </kendo-splitter-pane>

            <kendo-splitter-pane [resizable]="false">
                <h3>Right pane</h3>
            </kendo-splitter-pane>
        </kendo-splitter>
    `,
    styles: [ `
        h3 {
            font-size: 1.2em;
            padding: 10px;
        }

        .pane1 {
            background-color: red;
        }
    ` ]
})
class AppComponent {}
© www.soinside.com 2019 - 2024. All rights reserved.