【问题标题】:Why does PayPal Iframe stays above the fixed navbar?为什么 PayPal Iframe 停留在固定导航栏上方?
【发布时间】:2023-03-31 17:40:03
【问题描述】:

我已通过此链接 here 添加了 PayPal Checkout 按钮。我遇到的问题是存在 PayPal 按钮的 iframe 停留在页面上我的固定导航栏上方。为什么会发生这种情况,如何将其放回顶部?

我已尝试阅读文档,但似乎没有提及此行为。我也尝试将 z-index 更改为我的导航栏,但这没有帮助。

这是我的导航栏的 css。

.top {
  background-color: black;
  height: 50px;
  width: 100%;
  position: fixed;
  z-index: 5;
  top: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  color: white;
}
<nav class="top"></nav>

【问题讨论】:

  • 请提供您网站的链接

标签: html css paypal


【解决方案1】:

在您的 CSS 中,定位 iframe 元素并尝试添加此代码

position: relative;
z-index: 0;

【讨论】:

  • 你也可以定位到paypal按钮的父div。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-05-20
  • 1970-01-01
  • 2023-04-01
  • 1970-01-01
  • 1970-01-01
  • 2018-03-17
  • 1970-01-01
相关资源
最近更新 更多