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

210
Views
Change cursor based on background image color

I am using Vue 2, on the html I have an image which has white background, with a colorful object on the middle. Is it possible to detect and change the mouse cursor, based on the background color of where the mouse cursor is? Like, when on the white parts, against the actual object image (anything not-white).

Let's say it's an image like this. I want the cursor to change to pointer anywhere on the image where the background is not white.

https://www.vecteezy.com/vector-art/2751371-apple-with-a-white-background

Note: JQuery is not an option on this project

Thanks.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can't check the color that the mouse touches, but you can just use a css rule to set the cursor for a specific element, as used the example you linked.

img {
  cursor: zoom-in;
}

See more info on mdn

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!