"Create a Stylish Spinner with Balls using HTML, CSS, and JavaScript | Web Development Tutorial"

 <!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Spinner with Balls</title>

  <style>

    body {

      display: flex;

      justify-content: center;

      align-items: center;

      height: 100vh;

      margin: 0;

    }


    .spinner {

      position: relative;

      width: 80px;

      height: 80px;

      animation: spin 1s linear infinite;

    }


    .ball {

      position: absolute;

      width: 20px;

      height: 20px;

      background-color: #3498db; /* Blue */

      border-radius: 50%;

    }


    .ball1 { top: 0; left: 50%; transform: translateX(-50%); }

    .ball2 { bottom: 0; left: 0; }

    .ball3 { bottom: 0; right: 0; }


    @keyframes spin {

      0% { transform: rotate(0deg); }

      100% { transform: rotate(360deg); }

    }

  </style>

</head>

<body>

  <div class="spinner">

    <div class="ball ball1"></div>

    <div class="ball ball2"></div>

    <div class="ball ball3"></div>

  </div>


  <script>

    // You can add JavaScript logic here if needed

  </script>

</body>

</html>


Comments

Popular posts from this blog

Cute Lamp Login Page

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

Portfolio website