Header Animation | Bold Text & 3D Effect | CSS Tutorial|Cursor animation effect using html css js

Code 


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Header Animation</title>
  <style>
    header nav ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    header nav ul li {
      display: inline-block;
      margin-right: 20px;
    }

    header nav ul li a {
      text-decoration: none;
      color: #333; /* default color */
      position: relative;
      transition: color 0.3s ease, transform 0.3s ease;
      font-weight: bold; /* make text bold */
    }

    header nav ul li a:hover {
      color: red; /* hover color */
      transform: translateZ(10px); /* add 3D effect */
    }

    header nav ul li a::after {
      content: '';
      position: absolute;
      bottom: -3px;
      left: 0;
      width: 100%;
      height: 2px;
      background-color: transparent;
      transition: background-color 0.3s ease;
    }

    header nav ul li a:hover::after {
      background-color: red; /* underline color */
    }
  </style>
</head>
<body>
  <header>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Service</a></li>
        <li><a href="#">Contact</a></li>
        <li><a href="#">About</a></li>
      </ul>
    </nav>
  </header>
  <script>
    // JavaScript is not needed for this animation.
    // It's included here for future enhancements or interactivity.
  </script>
</body>
</html>

Comments

Post a Comment

Popular posts from this blog

Cute Lamp Login Page

All videos downloader