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

所以我有一个 HTML登录表单与两个字段:电子邮件和密码.这些可以在除iOS设备(iPhone,iPad)之外的任何设备的浏览器上轻松填充.
IOS领域几乎不能关注焦点,一旦焦点,键盘弹出,我开始打字,但实际上没有填充.我已经尝试过Chrome和safari,仍然得到相同的结果.字段保持黑色. Bellow是我的格式如何格式化:
<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>

请帮助 !我会真的很感激

我尝试添加一个自动对焦属性,预设一个值并且仍然相同.

谢谢

解决方法

发现问题,这是一个样式表重置,我在网上找到帮助触摸设备行为,当用户触摸/保存元素,我将其复制到我的大部分项目.所以如果你有这个问题,很可能你在你的css中有这些行:
*,*:before,*:after {
      -webkit-user-select: none;
      -khtml-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
     }

所以只需删除它或将其设置为认值.如果您打算阻止人们选择您网站上的内容,那么请确保将此样式属性重置为认输入

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

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...