Is there any way to change JUST the color of the textarea cursor without changing the font color?

筅森魡賤 提交于 2019-12-12 01:35:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!