移动端兼容

部分情况下对非可点击元素如(label,span)监听click事件时,ios下不会触发hack:css中增加cursor:pointer

1、ios只识别/ 不识别-:new Date("year/month/day");

2.滚动条时卡顿、慢 overflow-scrolling: touch;

3.h5底部输入框被键盘遮挡问题

 鼠标获取焦点时 让dom元素出现在可见视图的顶部或底部   document.querySelector('#inputId').scrollIntoView();

 一些情况下对非可点击元素如(label,span)监听click事件,ios下不会触发,css增加cursor:pointer就搞定了。

 

.fixed定位缺陷

 

  • ios下fixed元素容易定位出错,软键盘弹出时,影响fixed元素定位
  • android下fixed表现要比iOS更好,软键盘弹出时,不会影响fixed元素定位
  • ios4下不支持position:fixed
  • 解决方案: 可用iScroll插件解决这个问题

 

 

12.ios下取消input在输入的时候英文首字母的默认大写

<input autocapitalize="off" autocorrect="off" />

 

 

13.android下取消输入语音按钮

input::-webkit-input-speech-button {display: none}

 

 

原文地址:https://www.cnblogs.com/zhaozhenzhen/p/14242318.html