c# – 剑道按钮`k-danger`无效
发布时间:2020-12-15 07:44:24 所属栏目:百科 来源:网络整理
导读:我在C#项目中使用Kendo MVC. 我正在尝试将k-danger类添加到kendo按钮.我不知道为什么,但它不适用于k-primary类的工作原理. 这是我的按钮代码: button type='button' id='Button1' onclick='Delete(#=ID#)' class='k-button k-button-icontext k-grid-add k-
我在C#项目中使用Kendo MVC.
我正在尝试将k-danger类添加到kendo按钮.我不知道为什么,但它不适用于k-primary类的工作原理. 这是我的按钮代码: <button type='button' id='Button1' onclick='Delete(#=ID#)' class='k-button k-button-icontext k-grid-add k-danger'> // This is just showing the default button <span class='k-icon k-i-trash'></span> </button> <button type='button' id='Button2' onclick='Info(#=ID#)' class='k-button k-button-icontext k-grid-add k-i-pencil'> // This is showing the primary button <span class='k-icon k-i-pencil'></span> </button> 图标完美无缺. 如果没有k-danger可用,我还能用什么来代替k-danger? 如果需要,我可以提供完整的代码. 解决方法
danger(或实际上是btn-danger)是一个特定于Bootstrap的CSS类名,实际上,它在Kendo UI样式表中不存在.我建议有两种选择:
>假设您已注册Bootstrap样式表,请尝试使用Bootstrap的btn-danger CSS类.缺点是您可能会偶然发现Kendo UI与Bootstrap样式冲突,结果按钮外观将是两个库样式之间的混合. .k-button.k-danger,.k-button.k-danger:active { background-color: #f00; color: #fff; border-color: #f00; } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容