[英]How to make last td of the row to highlight once a row is hovered just using css?
我想突出显示该行悬停时的最后一个单元格。 是否有可能仅用CSS做到这一点。 这是工作链接。
http://jsbin.com/isukemih/2/edit
我尝试了以下方法
tr:hover {
background-color: #f00;
}
tr:last-child:hover {
background-color: #f00;
}
尝试这个
tr:hover td:last-child {
background-color: #f00;
}
你有很多不错的选择
tr:hover td:last-child {
background-color: red;
}
要么
tr:hover td:last-of-type {
background-color: red;
}
要么
tr:hover td:nth-last-child(1){
background:red;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.