我已将光标设置为CSS中的指针。然而,当您在文本上的div内单击并拖动时,光标将更改为文本。 更新:这似乎只发生在Safari(在9.0.1中测试)
#test {
cursor: pointer;
background-color:red;
display:table;
}

<div id="test">testing</div>
&#13;
答案 0 :(得分:1)
只需在悬停时使用cursor属性:
#test:hover {
cursor: pointer;
}
答案 1 :(得分:1)
您可以使用:active
伪类:
#test {
cursor: pointer;
background-color:red;
display:table;
}
#test:active{
cursor: auto;/*changes to text-cursor*/
}
<div id="test">testing</div>
答案 2 :(得分:1)
有点JS可以做到:
document.onmousedown = function () {
document.getElementById("parent").style.cursor = "pointer"
}
document.onmouseup = function () {
document.getElementById("parent").style.cursor = "default"
}
&#13;
#test {
cursor: pointer;
background-color:red;
display:table;
}
#parent {
height: 100px;
background-color:green;
}
&#13;
<div id="parent"><div id="test">testing</div></div>
&#13;