Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

css - 当用户将鼠标悬停在列表项上时,使光标成为手(Make the cursor 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.

(现在,当我将鼠标悬停在列表项上时,该指针将变为文本选择指针。)

  ask by user246114 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

正如人们所说,鉴于时间的流逝,您现在可以放心使用:

li { cursor: pointer; }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...