我需要创建一个带有信息徽章的圆形按钮,就像这个:
我该如何使绿色按钮的斜角环绕红色信息徽章?不能使用普通的白色边框来包围红色徽章(如下面的代码片段中所示),因为它必须是透明的并显示页面背景颜色。.shape {
position: relative;
height: 50px;
width: 50px;
border-radius: 50%;
background: rgb(0, 199, 158);
margin: 25px;
}
.shape:after {
position: absolute;
content: '';
top: -10px;
right: -10px;
height: 25px;
width: 25px;
border-radius: 50%;
border: 3px solid white;
background: rgb(255, 67, 0);
}
body {
background: chocolate;
}
<div class='shape'></div>