0
0
0leg5ergeev2015-10-13 01:58:01
css
0leg5ergeev, 2015-10-13 01:58:01

How to set svg cursor color?

.wrapper {
    cursor: url(/icons/krestik.svg), default;
}

How can the cursor be set to fill? Or is there another way to change its color?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2015-10-13
@0leg5ergeev

Download cursor via ajax.
We change the color in the cursor, which is represented by text data.
We encode in base64.
Pin a new style tag to the page

.wrapper {
    cursor: url('data:image/svg+xml;....'), default;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question