atfeel
V2EX  ›  CSS

谁知道如何使用 css,实现这样的下圆弧效果?

  •  
  •   atfeel · Jun 14, 2023 · 2401 views
    This topic created in 1078 days ago, the information mentioned may be changed or developed.

    大家好,如图这样的下圆弧效果是怎么做出来的呢? CSS 还是图片呢?

    7 replies    2023-06-14 20:47:07 +08:00
    MzM2ODkx
        1
    MzM2ODkx  
       Jun 14, 2023
    1145148964
        2
    1145148964  
       Jun 14, 2023
    <font style="vertical-align: inherit;"><font style="vertical-align: inherit;">0% 0% 50% 50% / 0% 0% 10% 10%</font></font>
    atfeel
        3
    atfeel  
    OP
       Jun 14, 2023
    厉害啊,哥哥
    LeegoYih
        4
    LeegoYih  
       Jun 14, 2023
    https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
    试试这个
    border-radius: 50% / 10%;
    border-top-left-radius:0;
    border-top-right-radius:0;
    atfeel
        5
    atfeel  
    OP
       Jun 14, 2023
    不过,如果是固定的尺寸能用这个方法,似乎对于不同的手机分辨率,就行不通了
    learnshare
        6
    learnshare  
       Jun 14, 2023
    圆的宽度用屏幕宽度的 4~6 倍
    atfeel
        7
    atfeel  
    OP
       Jun 14, 2023

    可以了非常感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1018 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 22:34 · PVG 06:34 · LAX 15:34 · JFK 18:34
    ♥ Do have faith in what you're doing.