问题
I'm creating a mobile version of my website and it has a huge space at the bottom of the page. I've tried all that I can to remove it but it doesn't even bulge. Any suggestions on how to solve this problem. Here is the link
I've tried stuff like
body {
margin-bottom: -25px;}
and it still didn't work.
回答1:
Yes, fixed position footers are the way to go:
<div data-role="footer" data-position="fixed">
<a href="#" data-rel="back">OK</a>
</div>
回答2:
After a couple of experiments, I solved the problem with the lines of CSS below:
#footer {
color:#FFC;
height:40px;
position:fixed;
border-top: solid 1px #FFC;
padding: 0;
bottom: 0;
}
#page {
text-align: center;
border-bottom: solid 1px #FFC;
height: auto;
padding: 0;
bottom: 0;
}
I did give the data-role footer an ID called #footer
来源:https://stackoverflow.com/questions/11908635/jquery-mobile-bottom-space