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

111
Views
svg as cursor url value not getting applied

I want to use an svg for cursor icon when the required details matches

the svg i'm using (ik its png to upload here) enter image description here

.apply-copy{
    cursor: url('./icons/apply-format.svg'),auto;
}

how i'm changing the cursor

document.querySelector('.ck-editor__editable').classList.add('apply-copy');
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Here is an example to apply the special cursor to the second .item class.

Your code maybe working.. but make sure that your image path is correct url('./icons/apply-format.svg')

document.getElementsByClassName('item')[1].classList.add('cursor');
.item{
  padding: 10px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  margin: 5px auto;
  max-width: 150px;
  text-align: center;
  cursor: default;
}

.cursor{
  cursor: url('https://i.stack.imgur.com/ehitY.png'), auto; 
}
<div class="item">something</div>
<div class="item">something</div>
<div class="item">something</div>

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!