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

前端 未结 6 1916
爱一瞬间的悲伤
爱一瞬间的悲伤 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:29

    Try this:

    tr:hover td {
      background-color: #FFFAF0; color: #000;
    }
    

    Place this after the existing td style declarations to be safe

提交回复
热议问题