MENU

通知機能の赤ポチをつくる

ポイント

  • fontawsome
  • css 疑似要素

実装

f:id:everydayProguramming:20201212115524p:plain

html css

html

%i.far.fa-bell.have-notification

css

.have-notification:after {
  content: "●";
  font-size: 10px;
  position: absolute;
  right: 11px;
  top: 26px;
  color: red;
}

疑似要素でまるを作って、positionで位置を調整すればOK