AlphaRobert
V2EX  ›  CSS

WebKit 给自家的 Apply Pay Button 用了光滑圆角

  •  
  •   AlphaRobert · Mar 17, 2021 · 2626 views
    This topic created in 1889 days ago, the information mentioned may be changed or developed.

    对比 上:Apple Pay button /下:同等大小和 border-radius 的黑色 div

    然而 Apple Pay button 的圆角可以通过 border-radius 来控制,甚至在圆角过大的时候变成光滑胶囊形。在 macOS Mojave 上测试也依然是光滑圆角。

    S.A. iOS 7 的圆角矩形

    6 replies    2021-03-17 17:15:00 +08:00
    yaphets666
        1
    yaphets666  
       Mar 17, 2021
    你怎么确定 appe pay 的这个 button 是 css 控制的呢 有网站吗?
    AlphaRobert
        2
    AlphaRobert  
    OP
       Mar 17, 2021
    @yaphets666 给任一元素指定 -webkit-appearance 都可以验证
    yaphets666
        3
    yaphets666  
       Mar 17, 2021
    @AlphaRobert 不是 我说的是你怎么知道 appe pay 的这个 button 是 css 控制的样式 而不是 canvas 画出来的呢? 你在哪个网站看到的这个按钮呢
    AlphaRobert
        4
    AlphaRobert  
    OP
       Mar 17, 2021
    @yaphets666 WebKit 提供了非常简单的方法绘制 Apple Pay button:任意元素只要其 -webkit-appearance: -apple-pay-button,就都会变成 Apple Pay button 。显然 -webkit-appearance 是 CSS 属性。这里有 Apple 官方的 demo: https://applepaydemo.apple.com
    yaphets666
        5
    yaphets666  
       Mar 17, 2021
    估计是内核做了特殊的支持吧
    AlphaRobert
        6
    AlphaRobert  
    OP
       Mar 17, 2021
    @yaphets666 明明有支持平滑圆角却不提供接口,用低劣圆角打压竞争对手
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1113 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 18:37 · PVG 02:37 · LAX 11:37 · JFK 14:37
    ♥ Do have faith in what you're doing.