【问题标题】:AMP elements covering other items with absolute positioningAMP 元素覆盖具有绝对定位的其他项目
【发布时间】:2017-11-18 01:41:15
【问题描述】:

我有一个基本的 AMP 页面,其中包含一个 amp iframe 和一些 amp 图片

https://www.freshcottages.com/region/cambridgeshire.htm

当您点击主菜单项(例如“England”)时,菜单会出现在 AMP iframe 和 AMP 图片的后面。

有没有办法阻止这种情况?我试过玩 z-index 但没有成功。

如果将项目转换为标准 iframe 和 img 元素,那么它们可以正常工作,因此看起来就像是 AMP 框架将其扔掉了

【问题讨论】:

    标签: css absolute amp-html amp-img


    【解决方案1】:

    您需要将position: relative 和大于零的z-index 值添加到您的nav 元素中,这应该可以解决您的问题。

    【讨论】:

      猜你喜欢
      • 2016-04-11
      • 1970-01-01
      • 1970-01-01
      • 2023-03-13
      • 2016-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-09
      相关资源
      最近更新 更多