【问题标题】:Cannot apply css style for kendo-checkbox inside a kendo-treeview无法在 kendo-treeview 中为 kendo-checkbox 应用 css 样式
【发布时间】:2019-08-30 09:03:57
【问题描述】:

我有一个

我的问题是 k-treeview 的 CSS 是从 scss 文件应用的,但它不适用于 kendo-checkbox

我试过了

<kendo-treeview
        [nodes]="tcHolderProducts"
        class="productTree"
        [textField]="'text'"
        kendoTreeViewCheckable
        kendoTreeViewExpandable
        kendoTreeViewSelectable
        [(checkedKeys)]="checkedKeys"
        [children]="children"
        [hasChildren]="hasChildren"
      >
      </kendo-treeview>
and my css is :

  .k-treeview {
    column-count: 2;
    -moz-column-count: 2;
    -moz-column-gap: 20px;
    -webkit-column-count: 2;
    -webkit-column-gap: 20px;
    column-gap: 20px;
    kendo-checkbox {
      padding-bottom: 10px;
    }
  }

已经使用了很多类但没有任何帮助

【问题讨论】:

  • 您能否展示一些代码和/或 stackblitz 项目,我们可以在其中重现您的问题。

标签: css angular kendo-ui kendo-treeview


【解决方案1】:

尝试将您的 scss 放入全局 style.scss 文件中。

【讨论】:

    【解决方案2】:

    在样式之前添加: ::ng-deep .productTree { } 它可以在您自己的 UI 组件中制作样式

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      相关资源
      最近更新 更多