https://blog.csdn.net/lvmingci/article/details/78781622
css 样式参考
https://blog.csdn.net/Wonder233/article/details/80613902
https://blog.csdn.net/weixin_36485956/article/details/78314186
--个人实现
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
/* text-align: center; */
}
.tip {
min-width: 20px;
height: 20px;
background: red;
box-sizing: border-box;
color: white;
font-size: 10px;
text-align: center;
line-height: 20px;
padding: 0 5px;
border-radius: 10px;
display: inline-block;
position:relative;
left: 70px;
}
.msg{
position:relative;
top: 10px;
left: 15px
}
</style>
</head>
<body>
<div style="width:80px;height:50px;background-color:yellow;position:relative;">
<div class="tip">1</div>
<span class="msg">消息</span>
</div><br/>
<div class="tip">95</div><br/>
<div class="tip">99+</div>
</body>
</html>