How to change the cursor into a hand when a user hovers over a list item?(当用户将鼠标悬停在列表项上时,如何将光标变为手形?)
问题描述
我有一个列表,并且我有一个用于其项目的点击处理程序:
I've got a list, and I have a click handler for its items:
<ul>
<li>foo</li>
<li>goo</li>
</ul>
如何将鼠标指针变为手形指针(例如悬停在按钮上时)?现在,当我将鼠标悬停在列表项上时,指针变为文本选择指针.
How can I change the mouse pointer into a hand pointer (like when hovering over a button)? Right now the pointer turns into a text selection pointer when I hover over the list items.
推荐答案
随着时间的推移,正如人们所说,您现在可以放心地使用:
In light of the passage of time, as people have mentioned, you can now safely just use:
li { cursor: pointer; }
这篇关于当用户将鼠标悬停在列表项上时,如何将光标变为手形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:当用户将鼠标悬停在列表项上时,如何将光标变为手形?


基础教程推荐
- 检查 HTML5 拖放文件类型 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bokeh Div文本对齐 2022-01-01