简体   繁体   English

KendoUI TreeList更改展开/折叠图标

[英]KendoUI TreeList Change Expand/Collapse Icon

Im trying to change the default expand/collapse icons to bigger icons. 我试图将默认的展开/折叠图标更改为更大的图标。 I've set the following css change which doesnt seem to be taking any effect: 我设置了以下css更改,该更改似乎没有任何效果:

.k-treelist .k-minus {        
     background: url('../img/Misc/customCollapsedIcon.png') center center;
}

.k-treelist .k-plus {
    background: url('../img/Misc/customExpandedIcon.png') center center;
 }

Can anyone give me some advice on what I need to change for this to take affect on the TreeList? 谁能给我一些建议,以使我对TreeList产生影响?

Try specifying the exact height and width for each new icon, in these CSS rules. 在这些CSS规则中,尝试为每个新图标指定确切的高度和宽度。

If that doesn't work, make sure that other CSS rules aren't overriding these rules. 如果那不起作用,请确保其他CSS规则没有覆盖这些规则。

with the 2016 Q1 version you need to use 您需要使用2016 Q1版本

.k-treelist .k-i-expand{
background: url("/Content/...") center center no-repeat // i'm on an asp.net web app
}
.k-treelist .k-i-collapse{
background: url("/Content/...") center center no-repeat
}

i was using font awesome icons so i had to go to http://fa2png.io/ and convert chevron-right to a png and save it 16x16 我使用的字体真棒图标,所以我不得不去http://fa2png.io/并将chevron-right转换为png并保存为16x16

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM