zoukankan      html  css  js  c++  java
  • 兼容问题大全

    1.IOS下调取键盘后position:fixed;失效问题解决办法:

    方法一:

     $(function(){

           $('#phone').bind('focus',function(){
           $('.bottom_fix').css('position','static');  //需要fixed定位的元素
                           //或者$('#viewport').height($(window).height()+'px');  
            }).bind('blur',function(){  
                $('.bottom_fix').css({'position':'fixed','bottom':'0'});  //需要fixed定位的元素
                //或者$('#viewport').height('auto');  
            }); 
     })
    方法二:
    document.getElementById(“test”).scrollIntoView();
    2.click点击后会延迟30ms
    3.:active伪类是在类似'mousedown'事件触发的时机生效的,而手机上并没有'mousedown'事件,取而代之的只有'touchstart'和'touchend'。
    var a = document.getElementsByTagName('a'); for(var i = 0; i < a.length; i++) { a[i].addEventListener('touchstart',function(){},false); }

  • 相关阅读:
    轮播无缝
    项目开发的注意
    再聊移动端页面的适配
    如何在Vue项目中使用vw实现移动端适配
    移动端适配文章
    vue-cli 配置flexible px2rem-loader安装配置
    vuex复习笔记
    vue-router复习笔记
    vue-cli 笔记
    内置组件 -slot讲解
  • 原文地址:https://www.cnblogs.com/zhouyx/p/6014750.html
Copyright © 2011-2022 走看看