fontAwesomeのアイコンにバッジをつける方法
835 ワード
通知があった時に右上に通知マークを表示するカスタマイズについて。
<i class="fas fa-bell badge"></i>
badgeというclassを設定します。
あとはCSSを追加。
css
.fa-bell{
position: relative;
}
.badge:after{
content:"";
position: absolute;
background: #fff;
height:6px;
width:6px;
top:-2px;
right:-5px;
text-align: center;
border-radius: 50%;
color:white;
}
通知があった時だけ、badgeを追加すればいいですね。
Author And Source
この問題について(fontAwesomeのアイコンにバッジをつける方法), 我々は、より多くの情報をここで見つけました https://qiita.com/iritec/items/c0854d9526e0623cce37著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .