您的位置:首页 > 移动开发 > WebAPP

webapp之登录页面当input获得焦点时,顶部版权文本被顶上去 的解决方法

2017-03-28 11:33 302 查看


如上图,顶部版权是用绝对定位写的,被顶上去了,解决方法是判断屏幕大小,改变footer的定位方式:

<script>

var oHeight = $(document).height(); //浏览器当前的高度
$(window).resize(function(){

if($(document).height() < oHeight){

$(".footer").css("position","static");
}else{

$(".footer").css("position","absolute");
}

});
</script>


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐