html - Css - 手镯形曲线 div/button

标签 html css

需要为按钮/div 使用 css 来实现此目的

enter image description here

有什么提示吗?

谢谢!

最佳答案

只有CSS:

button { border: none; background: transparent; cursor: pointer; }
.it {
  width: 30rem;
  height: 3rem;
  border-radius: 50%;
  background: #db601b;
  border: 2px solid #707f92;
  position: relative;
  z-index: 1;
}

.it.i {
  z-index: 3;
  background: #e9a076;
  border: 2px solid #a78d84;
}


.aver {
  background:#db601b;
  height: 5rem;
  width: 30rem;
  border-left: 2px solid #707f92;
  border-right: 2px solid #707f92;
  margin: -1.7rem 0;
  position: relative;
  z-index: 2;
}
<button>
  <div class="it i"></div>
  <div class="aver"></div>
  <div class="it"></div>
</button>

关于html - Css - 手镯形曲线 div/button,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39177836/

相关文章:

html - 菜单覆盖 - 无法使内容全高

php - 如何创建 yii2 内联复选框列表

html - 当后缀不是 .css 时,@import 不起作用?

html - 我想将类用于输入 type=submit

css - css 下拉菜单的 z-index 问题

html - 如何水平均匀分布元素?

javascript - 我如何隐藏 html 直到它被 javascript 处理?

javascript - 选择下拉菜单时的 onchange 函数将填充文本框

css - 试图垂直对齐容器 div 中的两个 float div

css - 如何在 html 网格上完美对齐 svg 网格