如何从输入类型文本框中删除闪烁光标 [英] How to remove the Blinking Cursor from an input type textbox

查看:126
本文介绍了如何从输入类型文本框中删除闪烁光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 我要删除显示你的小闪烁指针,其中下一个键入的字母将在< input type =text> CSS ,没有 JS 允许。

  • I want to remove the little flashing pointer that shows you, where the next typed letter will be in the <input type="text">.
  • I can only use CSS, no JS allowed.

推荐答案

当然,您可以使用 CSS

Of course you can do it just with CSS.

将此代码添加到您的CSS文件中:

Add this code to your CSS file:

border: none;
color: transparent;
text-shadow: 0 0 0 gray;
text-align: center;

&:focus {
    outline: none;
}

这里有 SOURCE 演示

这篇关于如何从输入类型文本框中删除闪烁光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆