CSS Table Row border color with border-collapse

后端 未结 1 802
梦如初夏
梦如初夏 2021-01-11 22:33

I\'ve seen several posts here on the subject, and I\'ve read the W3C spec on border style conflict-resolution (and admit, I don\'t fully get it), and I\'m not sure how to ac

相关标签:
1条回答
  • 2021-01-11 23:16

    Firstly, you might be better off not using jQuery and instead using pure CSS:

    #datagrid tr.datarow:hover td {
        border: whatever;
    }
    

    Next, since you're using 1px borders, try this trick:

    #datagrid tr.datarow:hover td {
        border-style: double;
    }
    

    Since double is "more distinct" then solid, its colour takes precedence over cells around it, and looks identical to solid anyway ;)

    0 讨论(0)
提交回复
热议问题