Why doesn't CSS hover work on table rows when the cells inside the rows have class names?

前端 未结 6 1915
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 02:13

I am stuck with this problem so any help would be appreciated. I have a table with several rows. Each cell within the row belongs to a certain class. I use these class names to

6条回答
  •  执念已碎
    2021-02-04 02:38

    I think the td background-color overwrites the tr background-color. The solution given by @Nick Craver is the good one.
    You must change cells background-color not the row background-color.

    tr:hover td {
       ...
    }
    

提交回复
热议问题