如何更改Apple Pay Buttom(Safari)中的边界半径

问题描述 投票:0回答:1

默认情况下,苹果付款按钮的边框半径为5px /我需要将其设置为15px。我该如何追查该财产?当我设置

border-radius: 15px;。apple-pay-button类别,按钮不变[]

有代码示例:

@supports (-webkit-appearance: -apple-pay-button) { 
    .apple-pay-button {
        display: inline-block;
        -webkit-appearance: -apple-pay-button;
    }
    .apple-pay-button-black {
        -apple-pay-button-style: black;
    }
    .apple-pay-button-white {
        -apple-pay-button-style: white;
    }
    
    .apple-pay-button-white-with-line {
        -apple-pay-button-style: white-outline;
    }
}
@supports not (-webkit-appearance: -apple-pay-button) {
    .apple-pay-button {
        display: inline-block;
        background-size: 100% 60%;
        background-repeat: no-repeat;
        background-position: 50% 50%;
        border-radius: 5px;
        padding: 0px;
        box-sizing: border-box;
        min-width: 200px;
        min-height: 32px;
        max-height: 64px;
    }
    .apple-pay-button-black {
        background-image: -webkit-named-image(apple-pay-logo-white);
        background-color: black;
    }
    .apple-pay-button-white {
        background-image: -webkit-named-image(apple-pay-logo-black);
        background-color: white;
    }
    .apple-pay-button-white-with-line {
        background-image: -webkit-named-image(apple-pay-logo-black);
        background-color: white;
        border: .5px solid black;
    } 
}
<div class="apple-pay-button apple-pay-button-white"></div>

有Apple的代码官方文档。https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons

谢谢

默认情况下,苹果付款按钮的边框半径为5px /我需要将其设置为15px。我该如何追查该财产?当我设置border-radius时:15px;对.apple-pay-button类别,按钮不变。有代码...

css safari applepay applepayjs
1个回答
0
投票

对我有用的是在按钮的CSS中添加背景色。就我而言,我使用的是黑色按钮样式。

© www.soinside.com 2019 - 2024. All rights reserved.