鼠标移动到表格中的某一行时,将光标更改为手形

当鼠标移过<table><tr> ,如何将光标指针更改为手形

<table class="sortable" border-style:>
  <tr>
    <th class="tname">Name</th><th class="tage">Age</th>
  </tr>
  <tr><td class="tname">Jennifer</td><td class="tage">24</td></tr>
  <tr><td class="tname">Kate</td><td class="tage">36</td></tr>
  <tr><td class="tname">David</td><td class="tage">25</td></tr>
  <tr><td class="tname">Mark</td><td class="tage">40</td></tr>
</table>

实际上,你可以不用JavaScript来做到这一点

.sortable tr {
    cursor: pointer;
}

我搜索了bootstrap样式,发现了这一点:

[role=button]{cursor:pointer}

所以我认为你可以得到你想要的东西:

<span role="button">hi</span>

我发现的最简单的方法是添加

style="cursor: pointer;"

到您的标签。

链接地址: http://www.djcxy.com/p/27403.html

上一篇: Change cursor to hand when mouse goes over a row in table

下一篇: While hovering over a label, mouse pointer changes to hand