position:fixed 在 Windows Phone 上的问题

Issue with position:fixed on Windows Phone

我在底栏上使用position:fixed(这是一个固定的联系人菜单)。

<style>
.bottom-menu {
width:100%
height:50px
background-color:#e3e3e3;
position: fixed;
bottom: 0
}
</style>
<div class="bottom-menu">
some text and social icon
</div>

在 Windows Phone 上使用 IE,出现问题。

滚动 50% 后,我的底部菜单开始振动,也减慢了速度,return 到底部需要几秒钟。

您错过了 width:100% 和高度 50px 之后的分号 也没有 position:fixed ?你应该 post 整个代码 :)

<style>
.bottom-menu {
width:100%;
height:50px;
background-color:#e3e3e3;
position: fixed;
bottom: 0
}
</style>
<div class="bottom-menu">
some text and social icon
</div>

还要确保文档的开头有 <!DOCTYPE html>,因为这也会在某些浏览器中引起问题。 还有;在不必要的 CSS 文件的末尾 :)