gpt4 book ai didi

html - 在 jquery mobile 中导航时白色闪烁

转载 作者:行者123 更新时间:2023-12-01 06:50:36 27 4
gpt4 key购买 nike

我注意到,每当我在项目中的任何 html 文件之间导航时,都会出现白色闪烁,除非我导航离开索引文件。我正在使用 JQM,但没有使用 ajax,因为我链接到多页文档。

我读过在制作应用程序时使用 JQM 和 Phonegap 的人身上发生过这种情况,但对于常规桌面网站,我很困惑为什么会发生这种情况。有什么想法吗?

最佳答案

试试这个..

删除页眉和页脚上的data-position="fixed"(如果您正在使用它)。

然后,将以下 CSS 样式应用到页眉、内容和页脚:

.header {
position : fixed;
z-index : 10;
top : 0;
width : 100%
}
.content {
padding : 45px 15px
}
.footer {
position : fixed;
z-index : 10;
bottom : 0;
width : 100%
}

这个想法/片段借用自 Jasper 在 this question 中的答案(不是 OP 接受的答案)。 。我在单页 jQuery Mobile v1.1.0 + Phonegap 应用程序上遇到了闪烁问题,这为我解决了这个问题。也许同样的解决方法适用于 v1.3 上的多页面应用程序。

关于html - 在 jquery mobile 中导航时白色闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15623682/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com