JQuery Mobile Fixed Toolbar and Footer Bar disappears?

前端 未结 14 1124
Happy的楠姐
Happy的楠姐 2020-12-07 10:11

I am using JQuery Mobile version 4.1a and using:

data-position=\"fixed\"

on both header and footer.

When I scroll the content it di

相关标签:
14条回答
  • 2020-12-07 10:36

    In case you've tried everything and you're still struggling trying to fix this issue (like I was), try to update your jQuery mobile version. In v1.3.1 data-position="fixed" works like it should out of the box. I saw this suggestion nowhere and it's the first thing to check before trying any code so I thought I'd mention it.

    0 讨论(0)
  • 2020-12-07 10:37

    On JQM 1.3.2 here is my solution

    1. Add data-tap-toggle="false" to the fixed header/footer
    2. Add the CSS below to override the JQM CSS

    .ui-header-fixed.ui-fixed-hidden,
    .ui-footer-fixed.ui-fixed-hidden{
    	position: fixed !important;
    }
    
    header.ui-panel-animate {
    	-webkit-transition: none !important;
    }
    
    header.slidedown.out.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slidedown.in.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slidedown.out {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slidedown.in {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slideup.out.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slideup.in.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slideup.out {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    header.slideup.in {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.ui-panel-animate {
    	-webkit-transition: none !important;
    }
    
    footer.slidedown.out.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slidedown.in.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slidedown.out {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slidedown.in {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slideup.out.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slideup.in.reverse {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slideup.out {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }
    
    footer.slideup.in {
    	-webkit-transform: none !important;
    	-webkit-animation-name: none !important;
    	-webkit-animation-duration: 0ms !important;
    	transform: none !important;
    	animation-name: none !important;
    	animation-duration: 0ms !important;
    }

    0 讨论(0)
提交回复
热议问题