html - 如何使用 CSS 圆整一条直线?

标签 html css sass frontend

我想用 CSS 将直线圆化。但我没有成功。我该怎么做?谢谢。

截图:
- 设计:https://imgur.com/RCuJOVw
- 我的CSS代码:https://imgur.com/ssMLQkl

.steps {
    margin-left: 80px;
    margin-top: 100px;
    display: inline-block;
    position: relative;

    &:before {
       content: '';
       position: absolute;
       top: -130px;
       right: 50px;
       width: 30px;
       height: 1px;
       background-color: #eff0f1;
    }
}

最佳答案

在边框上使用 border-top-right-radius

div {
  width: 50px;
  height: 100px;
  border-top: 3px solid grey;
  border-right: 3px solid grey;
  border-top-right-radius: 15px;
}
<div></div>

关于html - 如何使用 CSS 圆整一条直线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54383851/

相关文章:

html - CSS/LESS更改多选中所选选项的背景颜色

html - CSS :before style

javascript - 在 CSS 中使用参数或现有变量

javascript - KnockoutJS "checked"绑定(bind)不适用于 observableArray 和单选按钮列表

javascript - 如何停止页脚上方的div

javascript - 单击按钮后消息出现在同一个 div 中

html - 为什么我没有在元素周围得到一个完美的圆圈

css - 创建一个流动的网格 - 百分比似乎搞砸了

css - 我怎样才能停止 prepos 来创建除 main.scss 之外的某些已编译的 scss

html - 为什么我的链接不起作用?