IOS设备问题与HTML表单input(type = text)

所以我有一个HTMLlogin表单有两个字段:电子邮件和密码。 除IOS设备(iPhone,iPad)外,这些设备的浏览器都可以轻松填充。 在IOS领域几乎没有焦点,一旦焦点,键盘popup,我开始打字,但实际上没有填写。 我已经尝试在Chrome和Safari浏览器,仍然得到相同的结果。 领域保持黑色。 贝娄是我的表格格式:

<form method="post" name="login" action="login"> <div class="divInputWrapper "> <i class="icon-envelope inputIcon inlineElt"></i> <label for="email"></label> <input type="text" name="email" placeholder="Enter your email address" class="formInput"/> </div> <div class="divInputWrapper "> <i class="icon-envelope inputIcon inlineElt"></i> <label for="password"></label> <input type="password" name="password" class="formInput"/> </div> <button class="blue centeredContent">Login</button> </form> 

我试着添加一个自动对焦属性,预设一个值,但仍然是相同的。

发现这个问题,这是一个我在网上find的样式表重置,以帮助触摸设备的行为,当用户触摸/持有一个元素,我复制了我的大部分项目。 所以,如果你有这个问题,最有可能你有你的CSS这些行:

  *, *:before, *:after { -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } 

所以只要删除它或将其设置为默认。 如果您的目的是阻止用户select网站上的内容,请确保您将此样式属性重置为默认input

  input, input:before, input:after { -webkit-user-select: initial; -khtml-user-select: initial; -moz-user-select: initial; -ms-user-select: initial; user-select: initial; }