//解决ios position fixed无效 这种方法会造成弹出框轻微移动 /*var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test(ua)) { var top = ($(window).height() - $(".strategyregister").height())/2; var left = ($(window).width() - $(".strategyregister").width())/2; var scrollTop = $(document).scrollTop(); var scrollLeft = $(document).scrollLeft(); $(".StrategyRegister").css( { position : 'absolute', 'top' :scrollTop+245 } ); } $(document).scroll(function() { var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test(ua)) { var top = ($(window).height() - $(".strategyregister").height())/2; var left = ($(window).width() - $(".strategyregister").width())/2; var scrollTop = $(document).scrollTop(); var scrollLeft = $(document).scrollLeft(); $(".StrategyRegister").css( { position : 'absolute', 'top' :scrollTop+245 } ); } });*/
解决ios position:fixed无效
最新推荐文章于 2024-06-27 14:17:33 发布