斑马条纹骑在我突出的颜色上 [英] zebra stripes over riding my highlighting color

查看:105
本文介绍了斑马条纹骑在我突出的颜色上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
斑马条纹覆盖我突出显示的颜色

Possible Duplicate:
zebra stripes over riding my highlighting color

我正在使用此代码在表格网格中浏览键盘.在我的代码中,我没有添加此斑马条纹编码.如果我添加了此斑马条纹将覆盖我的突出显示. 例如:第一行是深色,第二行是白色.我可以通过键盘在第一行看到高光,但是在第二行可以看到.

I am using this code to navigate through keyboard in table grid.In my code i have not added this zebra stripes coding.If i add this zebra stripes is overriding my highlighting. eg:first row dark color and second row white color.I can see highlight through keyboard in first row but i can see in second row.

[http://jsfiddle.net/hKZqS/15/]

此编码斑马条纹

$("#myTable").tablesorter({ widgets: ['zebra']} ); 

我有一个替代解决方案是使用border,但是如何在CSS中将其应用在这里.

I have an alternate solution is using border but how do i apply it here in my css.

推荐答案

您需要将突出显示颜色设置为比斑马色更强的规则.例如:

You need the rules that set the highlight color to be stronger than the zebra colors. For example:

tr.ui-selecting { background: #eee; }
tr.ui-selected { background: #dde; }

.odd {background-color: #ffd;}
.even {background-color: #dff;}

http://jsfiddle.net/hKZqS/16/

其他选项使用的是.ui-selected,.ui-selected.even,.ui-selected.odd,如果情况不佳,则使用!important规则.

Other options are using .ui-selected,.ui-selected.even,.ui-selected.odd, or an !important rule if you're having a bad day.

另请参阅: CSS特殊性:事物你应该知道

这篇关于斑马条纹骑在我突出的颜色上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆