Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Make mouse cursor custom image change onclick

First, I am building a website on cargo. There's html editor but I don't think it works that well along with the site builder itself.

I want my custom image mouse cursor image change while it's on click. I've got three problems here:

  1. I can't set my default cursor to image. (It was successful in cargo but I don't know how to do this on html editor.)
  2. I am not sure how to change my cursor to other image.
  3. I want this to make it happen on my whole site not just on single text or image.
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Here you go! It's quite simple to do:

Just write the cursor property to whatever Selector you want, for the whole WebSite html {...} of course.

html {
  background-color: lightgray;
  cursor: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/happy.png"), auto;
}
<html>

</html>

There are also a lot of default cursors: You can check them out here: https://codepen.io/chriscoyier/pen/uCwfB

about 4 years ago · Juan Pablo Isaza Report

0

I would simply use a combination of CSS and JavaScript.

CSS class declaring the appropriate cursor definition with a keyword fallback. Then add a simple onmousedown event to fire the addition of a second CSS class that declares an overriding cursor definition. Add a second onmouseout event to remove the second class that was added on click.

/* keyword fallback example: use pointer, if hand.png doesn't exist */
.cursor-hand {
  cursor: url(hand.png), pointer;
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!