问题
I want to have a function for my website that lets users tag other users/articles. But, anchor tags are not supported inside textareas. So, I set the background to transparent for the textarea and places a div beneath it. On the keyup event, the div is populated with the value of the textarea. The only problem is that the user can't see the cursor since it's transparent. Any ideas?
回答1:
You can do this via CSS... check the link http://beradrian.wordpress.com/2008/01/08/cross-browser-custom-css-cursors/
input, textarea {
cursor: url(cursor.cur);
}
来源:https://stackoverflow.com/questions/10682587/is-there-any-way-to-change-just-the-color-of-the-textarea-cursor-without-changin