【问题标题】:How do I change the color of the Kendo Grid toolbar "Download to Excel" button?如何更改 Kendo Grid 工具栏“下载到 Excel”按钮的颜色?
【发布时间】:2018-10-25 18:11:44
【问题描述】:

我想自定义 Kendo 网格 UI 在工具栏中提供的“导出到 Excel”按钮的颜色:

我已经能够使用 Site.css 中的定义更改工具栏的颜色本身

.k-grid-toolbar {
    background-color: white;
    background-image: none;
}

...但是为 .k-grid-toolbar-button、.k-grid-button 或 .k-grid-toolbar-item 添加类似的样式定义不会改变按钮颜色。

我也尝试过扩展工具栏语句:

$('#search_grid').kendoGrid({
    toolbar: [
        {
            name: 'excel',
            text: 'Download to Excel' 
        }
    ],

...并在此定义中指定“属性”、“类”或“样式”。我可以更改按钮 text,但不能更改颜色。如何更改按钮颜色?

非常感谢大家。我从这个网站学到了很多东西,但这是我的第一篇文章。

【问题讨论】:

    标签: javascript css kendo-grid


    【解决方案1】:

    在你的 CSS 中试试这个:

    .k-grid .k-header .k-button {
        background-color: red;
    }
    

    【讨论】:

      猜你喜欢
      • 2017-11-07
      • 1970-01-01
      • 2014-02-26
      • 2016-01-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-28
      • 2016-05-21
      相关资源
      最近更新 更多