How to make hover state on row table with CSS grid layout

后端 未结 5 1035
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 16:52

This a table that created with CSS Grid Layout, but I have a problem with it, I can\'t make hover state on each row.

I only want use CSS for this.

Can anyone

5条回答
  •  醉梦人生
    2020-12-14 17:45

    I had this problem. First, I'm curious to know why if you are using display grid, how come you are not using the grid-item class? is that not necessary? I think it is. Anyway, the answer is, you need to give all your div elements the grid-item class and set the position to Relative.

    .grid-item {
      position: relative;
    }
    

提交回复
热议问题