gpt4 book ai didi

javascript - 在 IOS 中隐藏输入字段闪烁的 CSS 光标

转载 作者:太空宇宙 更新时间:2023-11-03 20:27:28 27 4
gpt4 key购买 nike

如何隐藏 ios 输入字段闪烁的光标。我尝试了很多方法,但对我不起作用。

在 Windows 中,

SCSS

.input--textfield {
border: none;
color: transparent;
display: inline-block;
font-size: 2em;
text-shadow: 0 0 0 gray;

&:focus {
outline: none;
}
}

HTML

<input type="text" name="" value="10" class="input--textfield">

为我工作,

iOS

不能在代码下工作,你有什么建议吗。

最佳答案

试试下面它非常简单,适用于 IOS(5s、6)、IOS 桌面和 Windows。

.input--textfield { caret-color: transparent;
}
<input type="text" name="" value="10" class="input--textfield">

关于javascript - 在 IOS 中隐藏输入字段闪烁的 CSS 光标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50981064/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com