如题
移动端页面,现在在写消息通知,需要在消息结尾处加上一个小红点,标识未读。
下面是可运行样式
<div class="content-article">
<span class="article-title">这是通知消息的标题<i class="unread-point"></i></span>
</div>
.content-article {
// 超出隐藏
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.article-title {
font-size: 28rem;
position: relative;
}
// 消息未读状态(红色提示点)
.unread-point {
display: block;
background: #f23436;
border-radius: 50%;
width: 14rem;
height: 14rem;
top: 0;
right: -9rem;
position: absolute;
}
}
但是消息标题过多,超出隐藏之后,小红点也会被隐藏,该如何解决这个问题?
https://jsbin.com/yetiziyaqa/...
https://jsbin.com/horutaneco/...
省略的和红点分开