使用底部菜单的时候,如果页面中含有需要输入的内容,需要弹出系统键盘的话,就会把菜单顶上去? 怎么解决?
 
                                        
                                    
                                    
                                        s***@hotmail.com                                                                                
                                        
                                - 发布:2016-07-12 14:47
- 更新:2016-07-12 17:18
- 阅读:1579
 
                                                                    
                                                                赵梦欢 - 专注前端,乐于分享!
var tabbar = document.querySelector(".mui-bar-tab");  
document.querySelector("input").addEventListener('focus',function(e){  
    tabbar.style.display = 'none';  
})  
document.querySelector("input").addEventListener('blur',function(){  
    setTimeout(function(){  
        tabbar.style.display = 'block';  
    },300);  
}) 
             
             
             
			
 
            
wclssdn
不只是div模式会顶上来。。。 webview模式也会顶上来。。。还有, 这解决方案,也忒low了吧。。。。 能跟ios那样似的么。页面该咋样咋样,只有输入焦点刚好在键盘上方一点儿即可
2016-09-18 22:49