作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 KendoUi Grid(最新版本)和 AngularJS
我想在一列上使用可选功能,该功能显示一个复选框以(多)选择该行。这很好用。But when the row is selected its colour changes.但我只想使用复选框而不突出显示整行。
我试图弄清楚我必须使用哪个 CSS。这在设置“.k-grid table tr.k-state-selected”css 时也有效。但是,当鼠标悬停在所选行上时,它仍然是彩色的。我也尝试设置这些“.k-grid td.k-state-selected:hover, .k-grid tr:hover”css,但它不起作用。
我必须设置哪个 css,以禁用对选定行的完整突出显示。这是我目前使用的 CSS。悬停部分不起作用。
.k-grid table tr.k-state-selected {
color: red !important;
background-color: none !important;
background: none !important;
border-color: none !important;
}
.k-grid td.k-state-selected:hover, .k-grid tr:hover {
color: green !important;
background-color: none !important;
background: none !important;
border-color: none !important;
}
红色和绿色只是为了测试,看看它是否工作......
那么,我必须(重新)设置哪个 css 才能禁用突出显示?
谢谢
最佳答案
您可以向网格的更改事件添加一个函数。只需将其添加到您的网格定义中即可。
change: functionName
在你的函数调用中:
$('.k-state-selected').removeClass('k-state-selected k-state-selecting');
关于angularjs - KendoGrid 使用选中的复选框而不突出显示行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49877201/
我是一名优秀的程序员,十分优秀!