Paypal 按钮干扰导航栏?

发布于 2025-01-11 01:51:22 字数 1859 浏览 0 评论 0原文

我尝试将 Paypal 智能按钮添加到我的第一个项目中。当按下借记卡或信用卡按钮时,其上方的文本将穿过导航栏。 我尝试在背景图像中添加额外的空白,但它不起作用。 有没有办法扩展 Paypal 按钮脚本已经创建的空白区域? 我可以做什么来修复它?

导航栏问题

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.header{
    min-height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(4,9,30,0.4),rgba(4,9,30,0.4)),url(slike/slika\ 2.JPG);
    background-position: center;
    background-size: 100%;
    position: relative;
}
nav{
    display: flex;
    padding: 2% 6%;
    justify-content: space-between;
    align-items: center;
}
nav img{
    width: 500px; 
}
.nav-links{
    flex: 1;
    text-align: right;
}
.nav-links ul li{
    list-style: none;
    display: inline-block;
    padding: 8px 20px;
    position: sticky;
}
.nav-links ul li a{
    color: #7814ac;
    text-decoration: none;
    font-size: 30px;
    font-family: 'Lora', serif;
}
.nav-links ul li::after{
    content: "";
    width: 0%;
    height: 2px;
    background: white;
    display: block;
    margin: auto;
    transition: 0.5s;
}
.nav-links ul li:hover::after{
    width: 100%;
}
.text-box{
    width: 90%;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
    margin-top: 200px;
}
.text-box h1{
    font-size: 62px;
}
.text-box p{
    margin: 10px 0 40px;
    font-size: 36px;
    color: white;
}
.hero-btn{
    display: inline-block;
    text-decoration: none;
    color: white;
    border: 1px solid white;
    padding: 12px 34px;
    font-size: 24px;
    background: transparent;
    position: relative;
    cursor: pointer;
    margin-bottom: 5px;
}
.hero-btn:hover{
    border: 1px solid #7814ac;
    background: #7814ac;
    transition: 1s;
}

I tried adding the Paypal smart button to my first project. When the Debit or Credit card button is pressed, the text above it goes through the navbar.
I tried adding additional blank space to the background image, but it did not work.
Is there a way to extend the blank space already made by the Paypal button script?
What can I do to fix it?

Navbar problem

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.header{
    min-height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(4,9,30,0.4),rgba(4,9,30,0.4)),url(slike/slika\ 2.JPG);
    background-position: center;
    background-size: 100%;
    position: relative;
}
nav{
    display: flex;
    padding: 2% 6%;
    justify-content: space-between;
    align-items: center;
}
nav img{
    width: 500px; 
}
.nav-links{
    flex: 1;
    text-align: right;
}
.nav-links ul li{
    list-style: none;
    display: inline-block;
    padding: 8px 20px;
    position: sticky;
}
.nav-links ul li a{
    color: #7814ac;
    text-decoration: none;
    font-size: 30px;
    font-family: 'Lora', serif;
}
.nav-links ul li::after{
    content: "";
    width: 0%;
    height: 2px;
    background: white;
    display: block;
    margin: auto;
    transition: 0.5s;
}
.nav-links ul li:hover::after{
    width: 100%;
}
.text-box{
    width: 90%;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
    margin-top: 200px;
}
.text-box h1{
    font-size: 62px;
}
.text-box p{
    margin: 10px 0 40px;
    font-size: 36px;
    color: white;
}
.hero-btn{
    display: inline-block;
    text-decoration: none;
    color: white;
    border: 1px solid white;
    padding: 12px 34px;
    font-size: 24px;
    background: transparent;
    position: relative;
    cursor: pointer;
    margin-bottom: 5px;
}
.hero-btn:hover{
    border: 1px solid #7814ac;
    background: #7814ac;
    transition: 1s;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦开始←不甜 2025-01-18 01:51:22

问题似乎出在所有文本所在的容器上。也许它有固定的位置或高度。黑色的借记卡/信用卡按钮需要渲染在一个可以正常扩展的容器中。如果由于某种原因您无法更改网站的 CSS 来允许此操作,您可以使用 &disable-funding=card 禁用黑色按钮。其他按钮将正常打开 PayPal 窗口。

The problem would appear to be the container in which all that text is located. Perhaps it has a fixed position or height. The black debit/credit card button needs to be rendered in a container that can expand normally. If for some reason you are not able to change the site's CSS to allow this, you can disable the black button with &disable-funding=card. Other buttons will open the PayPal window normally.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文