【问题标题】:Fixed header not fixed when there is horizontal overflow水平溢出时固定标题不固定
【发布时间】:2018-03-04 17:09:25
【问题描述】:

我有一个位置固定且宽度为 100% 的标题。它在桌面上按预期工作,但在移动浏览器(Chrome、Opera 和 Edge)中却没有。 我正在 Android 5.1 上进行测试,如果这有什么不同的话。

当出现水平溢出时,表头不再固定。

【问题讨论】:

    标签: css css-position horizontal-scrolling mobile-browser


    【解决方案1】:

    我通过在两个 htmlbody 上设置overflow: auto 来修复它。

    编辑:这样做会使标题越过滚动条。 实际的修复是将user-scalable=no 添加到<meta content='width=device-width,initial-scale=1' name='viewport'>

    this answer

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-15
      • 2023-03-19
      相关资源
      最近更新 更多