jQuery Mobile和页眉/页脚问题 [英] jQuery Mobile and header/footer issue
问题描述
使用jQuery Mobile的人是否知道为什么当使用changePage()函数更改为内容超过视口高度的页面时,页面的标题消失并且页脚出现在内容顶部的视图中?
With jQuery Mobile does anybody know why when using the changePage() function to change to a page where the content exceeds the height of the viewport does the header of the page disappear and the footer appear in view over the top of the content?
仅当您使用过渡来更改页面时,这种情况才会发生;如果您在不进行过渡的情况下更改页面,则会保留页眉,并且页脚正确地位于内容的末尾.
This only happens when you use a transition to change page, if you change page without a transition the header remains and the footer is correctly positioned at the end of the content.
谢谢
推荐答案
我整个上午一直在解决此问题,因为我遇到的是同一个人.我不完全知道jQuery移动脚本出了什么问题,但是由于某种原因,它在页面过渡效果后未能隐藏非活动窗口的x轴溢出.我通过将以下CSS放入要转换到的页面的页面div中来解决了这个问题.
I've been troubleshooting this issue all morning because I was having the same one. I don't exactly know what is wrong with the jQuery mobile script, but for some reason it is failing to hide the x-axis overflow for the inactive windows after a page transition effect. I fixed the problem by putting the following CSS inside the page div of the page being transitioned to.
.ui-mobile,.ui-page { 溢出-x:隐藏!重要; }
.ui-mobile, .ui-page { overflow-x: hidden!important; }
这篇关于jQuery Mobile和页眉/页脚问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!