How to change the appearance of the Insertion cursor of an input field? [closed]

问题: Closed. This question is off-topic. It is not currently accepting answers....

问题:

I'm working on a little project and want to change the appearance of the little blinking bar, which appears infront of a spot you're typing in. Its also known as just a 'cursor' or 'text-cursor'. I can change it either with css or javascript if that is possible.


回答1:

I don't believe you can do that, you'd have to hide it entirely and provide your own graphic, managing its position, etc.; basically, reinventing the text input field.

The closest you can come with CSS is caret-color, which lets you set the color in modern browsers but won't work in IE (and is only supported in very recent versions of Edge, the ones based on Blink and V8 instead of EdgeHTML and JScript). My impression is you want to do more than that. :-)

  • 发表于 2019-12-25 16:16
  • 阅读 ( 134 )
  • 分类:网络文章

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除