【发布时间】:2022-04-10 15:47:21
【问题描述】:
我正在尝试设计一个看起来像 sn-p 中的按钮。该方法是采用最佳实践还是有更明显的方法?为了获得圆润的边缘,似乎需要很多开销。
#p1,#p2{
height:25px;
width:25px;
border-radius:50% 0 0 50%;
background-color:blue;
}
#p2{
border-radius:0 50% 50% 0;
}
button{
height:25px;
width:75px;
background-color:blue;
border:none;
color:white;
}
#container{
display:flex;
align-items:center;
}
<div id='container'>
<p id='p1'></p>
<button>Update</button>
<p id='p2'></p>
</div>
【问题讨论】: