Display contact links with icons

by developer_success

HTML

<div class="contact-float">
    <div class="contact-item">
        <a href="#" class="contact-link">
            <img src="https://trangdesigner.id.vn/wp-content/uploads/2025/04/messenger-m.svg" alt="Messenger" />
            <span>Messenger</span>
        </a>
    </div>
    <div class="contact-item">
        <a href="#" class="contact-link">
            <img src="https://trangdesigner.id.vn/wp-content/uploads/2025/04/zalo-m.svg" alt="Zalo" />
            <span>Zalo</span>
        </a>
    </div>
    <div class="contact-item">
        <a href="#" class="contact-link">
            <img src="https://trangdesigner.id.vn/wp-content/uploads/2025/04/phone-m.svg" alt="Gọi điện" />
            <span>Gọi điện</span>
        </a>
    </div>
    <div class="contact-item">
        <a href="#" class="contact-link">
            <img src="https://trangdesigner.id.vn/wp-content/uploads/2025/04/form-m.svg" alt="Liên hệ" />
            <span>Liên hệ</span>
        </a>
    </div>
</div>

CSS

.contact-float,
.contact-item {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.contact-float {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  right: 20px;
  bottom: 40px;
  padding: 15px;
  background: 0 0;
  border-radius: 12px;
}
.contact-item {
  background: #fff;
  border-radius: 8px;
  transition: transform 0.3s;
  width: 50px;
  opacity: 0.8;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  transition: 0.3s;
}
.contact-link img {
  width: 24px;
  height: 24px;
  transition: 0.3s;
}
.contact-link span {
  display: none;
  font-size: 12px;
}
.contact-item:hover .contact-link img {
  width: 30px;
  height: 30px;
}
.contact-item:hover .contact-link span {
  display: inline-block;
}
@media (max-width: 1024px) {
  .contact-float {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 15px;
    background: 0 0;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }
  .contact-item {
    flex: 1;
    border-radius: 8px;
    animation: 3s ease-in-out infinite floatWiggleGlow;
    animation-delay: calc(var(--i, 1) * 0.3s);
    width: auto;
  }
  .contact-link {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
  }
  .contact-link img {
    width: 26px;
    height: 26px;
  }
  .contact-link span {
    display: inline-block;
    font-size: 12px;
  }
  .contact-item:first-child {
    --i: 1;
  }
  .contact-item:nth-child(2) {
    --i: 2;
  }
  .contact-item:nth-child(3) {
    --i: 3;
  }
  .contact-item:nth-child(4) {
    --i: 4;
  }
}
@keyframes floatWiggleGlow {
  0% {
    transform: translateY(20%) scale(0.9) rotate(0);
    box-shadow: 0 0 0 rgba(242, 131, 60, 0);
  }
  15% {
    transform: translateY(-5px) rotate(-2deg);
 ...