Подсказка3 - UI Components Подсказка3 - UI Components - UIComponents
Notifications CSS

Подсказка3

2 просмотров
0 загрузок
0 лайков
Автор: admin

Предпросмотр

<!-- From Uiverse.io by pharmacist-sabot --> 
<div class="plate-tooltip-container">
  <div class="tooltip-trigger" data-tooltip="ОСТОРОЖНО: Много качественного контента">
    <div class="warning-symbol"></div>
  </div>
</div>
/* From Uiverse.io by pharmacist-sabot */ 
.plate-tooltip-container {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.tooltip-trigger {
  --primary: #ffb200;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(to bottom, #3a3d44 0%, #212329 100%);
  border: 1px solid #444;
  box-shadow:
    inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
    inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
    0 10px 20px -3px rgba(0, 0, 0, 0.5);
  border-radius: 0.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: help;
  transition: transform 0.1s ease-out;
}

.warning-symbol {
  width: 0;
  height: 0;
  border-left: 0.7rem solid transparent;
  border-right: 0.7rem solid transparent;
  border-bottom: 1.2rem solid var(--primary);
  position: relative;
}

.warning-symbol::after {
  content: "!";
  position: absolute;
  color: #111;
  font-size: 0.9rem;
  font-weight: bold;
  font-family: sans-serif;
  left: 50%;
  top: 0.8rem;
  transform: translate(-50%, -50%);
}

.tooltip-trigger::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  opacity: 0;
  pointer-events: none;
  background: var(--primary);
  color: #111;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.9rem;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s cubic-bezier(0.2, 1.5, 0.5, 1),
    opacity 0.3s ease;
}

.tooltip-trigger::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 0.5rem solid transparent;
  border-right: 0.5rem solid transparent;
  border-top: 0.5rem solid var(--primary);
  transform: translateX(-50%) translateY(0.5rem);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.3s cubic-bezier(0.2, 1.5, 0.5, 1),
    opacity 0.3s ease;
}

.tooltip-trigger:hover {
  animation: electric-shock 0.25s linear infinite;
}

.tooltip-trigger:hover .warning-symbol {
  animation: warning-pulse 1s ease-in-out infinite;
}

.tooltip-trigger:hover::before,
.tooltip-trigger:hover::after {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@keyframes electric-shock {
  0% {
    transform: translate(0, 0);
    box-shadow:
      inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
      inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
      0 10px 20px -3px rgba(0, 0, 0, 0.5);
  }
  20% {
    transform: translate(-1px, 1px);
    box-shadow:
      inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
      inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
      0 10px 20px -3px rgba(0, 0, 0, 0.5),
      0 0 8px 1px var(--primary);
  }
  40% {
    transform: translate(-1px, -1px);
    box-shadow:
      inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
      inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
      0 10px 20px -3px rgba(0, 0, 0, 0.5);
  }
  60% {
    transform: translate(1px, 1px);
    box-shadow:
      inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
      inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
      0 10px 20px -3px rgba(0, 0, 0, 0.5),
      0 0 8px 1px var(--primary);
  }
  80% {
    transform: translate(1px, -1px);
    box-shadow:
      inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
      inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
      0 10px 20px -3px rgba(0, 0, 0, 0.5);
  }
  100% {
    transform: translate(0, 0);
    box-shadow:
      inset 0 2px 2px -1px rgba(255, 255, 255, 0.2),
      inset 0 -5px 5px -2px rgba(0, 0, 0, 0.8),
      0 10px 20px -3px rgba(0, 0, 0, 0.5);
  }
}

@keyframes warning-pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px var(--primary));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--primary));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px var(--primary));
  }
}