<script>
$('input').on('focus',function(event){
//自动反弹 输入法高度自适应
var target = this;
setTimeout(function(){
target.scrollIntoViewIfNeeded();
},800);
});
window.addEventListener("resize", function() {
if($(".saveBtn").hasClass("cur")){
$(".saveBtn").removeClass("cur")
}else{
$(".saveBtn").addClass("cur")
}
});
</script>
.saveBtn{
position: fixed;
bottom: 0;
left: 0;
}.saveBtn.cur{
position: static;
}
再或者是让按钮上方的元素padding-bottom:元素的高度