https://blog.youkuaiyun.com/lvmingci/article/details/78781622
css 样式参考
https://blog.youkuaiyun.com/Wonder233/article/details/80613902
https://blog.youkuaiyun.com/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>
本文详细介绍了一种使用CSS进行样式设计的方法,包括如何设置元素的宽高、背景颜色、边框圆角、内联显示等属性,以及如何通过相对定位调整元素的位置。通过具体的HTML和CSS代码示例,展示了如何创建具有特定样式的提示信息框。
1054

被折叠的 条评论
为什么被折叠?



