1

just like this I want to change the text cursor to a custom image. I have searched on all search engines. I can't find anything about the solution --> (Global)

I found a solution on W3Schools, but this is not global.

.text {
    cursor: text;
}

When we change hover link cursor,

a:hover {
    cursor: url(https://example.com/image/cursor.cur),auto!important;
}

Or default

* {
   cursor: url(https://example.com/image/cursor_default.cur),auto!important;
}

But how to change cursor when user hover the text.

  • Dou you mean the cursor should change whenever the user moves it on any text element (

    , ,

    – Programmer Feb 09 '21 at 00:26
  • https://i.stack.imgur.com/Re8O5.png – tszhong0411 Feb 09 '21 at 00:40
  • As far as I know, there are only three global values for cursors: `cursor: inherit; cursor: initial; cursor: unset;` each of these defaults to the `i-beam` look of the text value. – dale landry Feb 09 '21 at 00:55
  • So is it impossible? I have seen other people's websites and can do it. But I forgot which website I saw – tszhong0411 Feb 09 '21 at 00:58
  • 1
    Not sure exactly what you are trying to achieve really. Perhaps if you elaborate a bit more on your issue or give the community a reproducible example of some code that is not doing what you want it to do. – dale landry Feb 09 '21 at 01:20
  • When user hover on the text, the cursor would show `i-beam`, but i saw some one can change the cursor. Sorry, my english is not good. I hope you can understand. – tszhong0411 Feb 09 '21 at 01:26
  • Hey, welcome to stack overflow! It appears this question has been asked before [here](https://stackoverflow.com/questions/18551277/using-external-images-for-css-custom-cursors). Make sure to check if the question has already been answered before posting. – HackerMan Feb 09 '21 at 01:35
  • Does this answer your question? [Using external images for CSS custom cursors](https://stackoverflow.com/questions/18551277/using-external-images-for-css-custom-cursors) – HackerMan Feb 09 '21 at 01:36

0 Answers0