"position:fixed" 不适用于 Header 菜单

"position:fixed" Not Working For Header Menu

无论如何,header 菜单不会粘在屏幕顶部。

我怀疑这可能与周围的 html 结构有关 - 由于移动菜单(调整大小以激活),它非常复杂

position: fixed;
top: 0;
left: 0;

****link 已删除****

有什么想法吗?谢谢

这是因为变换创建了一个新的局部坐标系 - http://www.w3.org/TR/css3-2d-transforms/#transform-rendering

来看看here

body {
    background-color: #1B725F;
    color: #333;
    /*font-family: "brandon-grotesque", "adelle", "Times New Roman", sans-serif;*/
    font-family: "brandon-grotesque", "adelle", sans-serif;
    font-size: 18px;
    font-weight: 100;
    font-style: normal;
    line-height: 1.625;
    position: relative;
    -webkit-transform: translate3d(0,0,0); <-- here
    transform: translate3d(0,0,0);         <-- here
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}