10 hiệu ứng Hover logo hiện đại với HTML và CSS

10-modern-logo-hover-effects-with-html-and-css
Xem trực tiếp
DEMO:


Hiện tại mình cũng đang sử dụng 1 hiệu ứng trong thực tế tại banner trang này nè, nó khá đẹp.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Logo Hover Effects</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="effects-container">
        <div class="effect-wrapper">
            <p class="effect-name">Rotate</p>
            <div class="effect-box effect1">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 1">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Scale Up</p>
            <div class="effect-box effect2">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 2">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Skew</p>
            <div class="effect-box effect3">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 3">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Flip</p>
            <div class="effect-box effect4">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 4">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Grayscale</p>
            <div class="effect-box effect5">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 5">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Blur</p>
            <div class="effect-box effect6">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 6">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Brightness</p>
            <div class="effect-box effect7">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 7">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Shake</p>
            <div class="effect-box effect8">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 8">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Translate</p>
            <div class="effect-box effect9">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 9">
            </div>
        </div>
        <div class="effect-wrapper">
            <p class="effect-name">Pulse</p>
            <div class="effect-box effect10">
                <img src="https://www.codewithfaraz.com/favicon.ico" alt="Effect 10">
            </div>
        </div>
    </div>
</body>
</html>
<style>
    body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #f5f5f5;
  font-family: Arial, sans-serif;
}

.effects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.effect-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.effect-name {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.effect-box {
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.effect-box img {
  width: 80px;
  height: 80px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.effect-box:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.effect1:hover img {
  transform: rotate(360deg);
}

.effect2:hover img {
  transform: scale(1.5);
}

.effect3:hover img {
  transform: skewX(20deg);
}

.effect4:hover img {
  transform: scaleX(-1);
}

.effect5:hover img {
  filter: grayscale(100%);
}

.effect6:hover img {
  filter: blur(3px);
}

.effect7:hover img {
  filter: brightness(150%);
}

.effect8:hover img {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

.effect9:hover img {
  transform: translateY(-20px);
}

.effect10:hover img {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
      transform: scale(1);
  }
  50% {
      transform: scale(1.2);
  }
  100% {
      transform: scale(1);
  }
}
</style>