移动端兼容的问题

62 阅读1分钟

1.当设置样式overflow:scorll/auto时IOS上的滑动会卡顿

-webkit-overflow-scrolling:touch;

2.安卓环境下placeholder文字设置行高时会偏上

    input有placeholder属性时不要设置行高

3.移动端字体小于12px时显示异常

    通常是先把整体放大一倍然后通过transform属性进行缩小

4.ios设置input的disable属性为true时显示异常

input[type=button]{
    opacity:1
}

5.安卓手机下取消语音输入按钮

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

6.IOS下取消输入框英文首字母大写

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

7.禁用ios与安卓用户选中文字

   添加全局CSS样式 -webkit-user-select:none

8.禁止IOS各种弹窗

    添加CSS -webkit-touch-callout:none
   

9.禁止IOS识别长串数字为电话

    添加meta属性
    <meta content='telephone=no' name="format-detection">