如何更改iOS上的插入符的默认颜色输入? [英] How to change default color of caret on iOS for inputs?
问题描述
有什么方法可以在iOS上更改输入的蓝色脱字符号?
Is there any way to change blue colored caret on iOS for inputs?
推荐答案
我不知道 -webkit-text-fill-color
是,但是如果这是可以兼容的,你可以使用,文本阴影,颜色和背景颜色与CSS的组合创建所需的输入。不需要JS。
I am not sure what the compatibility of -webkit-text-fill-color
is, but if that is acceptable for compatibility you can use a combination of that, text-shadow, color, and background-color with css to create the desired input. No JS is required.
此方法的基础描述如下: http:// stackoverflow。 com / a / 30031723/1026459
This basis for this approach was described here: http://stackoverflow.com/a/30031723/1026459
蓝色可能很难看到(如果你把它改成白色,那就更明显了。)
The blue can be hard to see (if you change it to white it is a little more obvious).
input{
color: #456ce1;
text-shadow: 0px 0px 0px red;
-webkit-text-fill-color: transparent;
background-color: #272b36;
}
<input value = "CHCJ"/>
您的鼠标的输入字段。
这篇关于如何更改iOS上的插入符的默认颜色输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!