How to adjust the Caret (blinking cursor) size inside searchbar with css

前端 未结 6 557
误落风尘
误落风尘 2020-12-15 04:20

I tried to google it, and surprisingly found no result related... I wonder how can I use css to adjust the blinking cursor inside the search box with CSS? I adjusted the siz

6条回答
  •  [愿得一人]
    2020-12-15 04:36

    If caps is ok in your context, one easy hack is to use the css attribute font-variant: small-caps; to get the caret larger than the text.

    Another approach is to create your own caret using an input field replacement, someone spent time and achieved something working, but the author recommend to keep using the standard caret.

提交回复
热议问题