今天作项目时,h5页面上的有一个textarea输入框,在ios上 发现不能输入了html
查看了一下问题发现是由于在公共样式代码中写了以下代码ios
这个代码是防止用户长按粘贴的 加上这个就会影响ios的input 和textarea
-webkit-user-select:none; /*webkit浏览器*/
-khtml-user-select:none; /*早期浏览器*/
-moz-user-select:none;/*火狐*/
-ms-user-select:none; /*IE10*/
user-select:none;
复制代码
那么只要将以上 改为下面的就行了web
-webkit-user-select:auto; /*webkit浏览器*/
user-select:auto;
-o-user-select:auto;
-ms-user-select:auto;
复制代码