【问题标题】:why position fixed is not working on mobile screens?为什么固定位置在移动屏幕上不起作用?
【发布时间】:2018-04-26 23:58:43
【问题描述】:

这仅发生在移动版本上,在主要视频下方的部分中,当我单击它们时,我正在应用固定位置,但并未使元素固定,我想这可能是因为固定位置是在媒体查询中,但我不知道,我疯了 :( 哈哈哈,如果你能帮助我,我会把我的狗的照片发给你。

https://monumento-studio.github.io/thrust/

【问题讨论】:

  • 在这里帮助我们...将相关代码添加到您的问题中,进行演示,并准确说明问题所在以及应该发生的情况,谢谢

标签: html css position fixed


【解决方案1】:

您的 z 索引值较低 试试这个

    #nav {
  position: fixed;
    align-items: center;
    justify-content: space-between;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3.125rem;
    background: transparent;
    z-index: 100;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-09-23
    • 2013-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多