您可以首先border-radius使用:after伪元素创建矩形并添加三角形。
.shape {
width: 200px;
height: 50px;
background: #B67025;
margin: 50px;
border-radius: 25px;
position: relative;
}
.shape:after {
content: '';
position: absolute;
border-style: solid;
right: 0;
top: 50%;
border-width: 10px 0 10px 10px;
transform: translate(80%, -50%);
border-color: transparent transparent transparent #B67025;
}Run Code Online (Sandbox Code Playgroud)
<div class="shape"></div>Run Code Online (Sandbox Code Playgroud)