使用css突出显示所选行 [英] Highlight selected row using css

查看:142
本文介绍了使用css突出显示所选行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何使用css突出显示表中的所选行。

$

  tr {background:sky-blue- pink} / *使用真实的颜色* / 
tr * {background:transparent; }

其中 tr 以指示您在DOM中表示selected的任何条件。这可能是一个类选择器: tr.selected


How we can highlight selected row in a table using css. Is there any way to do that?

解决方案

tr { background: sky-blue-pink } /* Use a real colour */
tr * { background: transparent; }

where tr is a more specific selector to indicate whatever condition you have in the DOM to represent 'selected'. This will probably be a class selector: tr.selected

这篇关于使用css突出显示所选行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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