🔢 Notification Badge

Бейджи с количеством уведомлений

← Назад к Уведомления
Classic Badge
HTML
<div class="badge-wrapper">
  <span class="badge-icon">🔔</span>
  <span class="badge-count">5</span>
</div>
CSS
.badge-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.badge-icon {
  font-size: 2rem;
}
.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #ef3b53;
  color: white;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
Dot Badge
HTML
<div class="badge-wrapper">
  <span class="badge-icon">📧</span>
  <span class="badge-dot"></span>
</div>
CSS
.badge-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.badge-icon {
  font-size: 2rem;
}
.badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #43e97b;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}
Gradient Badge
HTML
<div class="badge-wrapper">
  <span class="badge-icon">💬</span>
  <span class="badge-gradient">99+</span>
</div>
CSS
.badge-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.badge-icon {
  font-size: 2rem;
}
.badge-gradient {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  animation: badgeShine 2s ease-in-out infinite;
}
@keyframes badgeShine {
  0%, 100% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 2px 16px rgba(102, 126, 234, 0.6); }
}