Asked 2 years ago
25 Apr 2022
Views 424
sarah

sarah posted

CSS - How to change the cursor into a hand on hover html element



<div onclick="alert('hi')" >
i have on click event
</div>


so as above HTML code, <div> have onclick event but when I do a mouse over on the div, it show pointer, it should be hand but don't know how to
sec8

sec8
answered Apr 25 '22 00:00


<div onclick="alert('hi')" style="cursor: pointer; " >
i have on click event
</div>

CSS has a cursor property which gives you on hover hand effect. so use style property like this cursor: pointer;

Post Answer