3

页面加载后和执行 listview('refresh') 页面闪烁。

所以在过渡后会闪烁,在$('#friendsList').append('#{data}').listview('refresh');我闪烁后

尝试添加

<style>
/*** for jquerymobile page flicker that was happending ***/
 .ui-page {
    -webkit-backface-visibility: hidden;
 }  
</style>

编辑

刷新列表视图时,我了解列表视图内部的闪烁,但是是否应该使整个页面闪烁?

编辑 2

如果列表高度 > 屏幕高度页面闪烁。如果列表高度 < 屏幕高度页面不闪烁。

4

2 回答 2

3

如果有人遇到与上述相同的问题,即在转换期间页面闪烁:

page content height > screen height

这在某种程度上与 JQM 提供的页眉/页脚有关。要解决这个问题:

1)data-position="fixed"从页眉/页脚中删除所有内容。

2) 包含以下 CSS 以提供相同的效果(但不闪烁)

.ui-page {
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}
.ui-header {
    position:fixed;
    z-index:10;
    top:0;
    width:100%;
    height: 40px;
}
.ui-content {
    padding-top: 57px;
    padding-bottom: 54px;
    overflow: auto;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
.ui-footer {
    position:fixed;
    z-index:10;
   bottom:0;
   width:100%;
}
于 2012-05-30T03:29:00.640 回答
0

删除 data-position="fixed" 有效,但我必须保留这些属性。最后我通过更改视口元标记修复:

<meta name="viewport" content="width=device-width, user-scalable=no" />

这是我找到答案的链接: 在页面之间导航时闪烁

于 2013-08-07T09:46:31.790 回答