【问题标题】:How to make bottom curve less then half in html [duplicate]如何在html中使底部曲线小于一半[重复]
【发布时间】:2018-08-02 04:13:03
【问题描述】:

我想为底部曲线制作 css,它有点小于一半曲线。但我无法做到这一点。我只能让它变成半曲线。

这里我试过了,但不适合

.bottom {
  height: 300px;
  width: 600px;
  border-bottom-left-radius: 600px;
  border-bottom-right-radius: 600px;
  background-color: #ebebeb;
}
<div class="bottom"></div>

这就是我想要做的。

【问题讨论】:

    标签: html css


    【解决方案1】:

    .bottom {
      height: 200px;
      margin: auto -150px;
      border-bottom-left-radius: 50%;
      border-bottom-right-radius: 50%;
      background-color: #ebebeb;
    }
    .outerDiv {
      overflow: hidden;
    }
    body {
      background-color: orange;
    }
    <div class="outerDiv">
        <div class="bottom"></div>
    </div>

    【讨论】:

      【解决方案2】:

      .bottom {
        height: 300px;
        width: 600px;
        border-radius: 100%/0 0 140px 140px;
        background-color: #ebebeb;
      }
      &lt;div class="bottom"&gt;&lt;/div&gt;

      【讨论】:

      猜你喜欢
      • 2019-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-02
      • 1970-01-01
      • 2021-10-04
      • 1970-01-01
      相关资源
      最近更新 更多