Multiple moving stars

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body {
            margin: 0;
            overflow: hidden;
        }

        .container {
            position: relative;
            width: 100%;
            height: 100vh;
            background-color: black;
        }

        .star {
            position: absolute;
            width: 10px;
            height: 10px;
            background-color: red;
            border-radius: 50%;
            animation: moveStar 5s linear infinite;
        }

        @keyframes moveStar {
            0% {
                transform: translateY(0) translateX(0);
            }
            100% {
                transform: translateY(-100vh) translateX(100vw);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- Create multiple stars -->
        <div class="star" style="top: 20%; left: 30%;"></div>
        <div class="star" style="top: 50%; left: 70%;"></div>
        <div class="star" style="top: 10%; left: 50%;"></div>
        <!-- Add more stars as needed -->
    </div>
</body>
</html>

Comments

Popular posts from this blog

Diagonal Relationship between Beryllium and Aluminium || Relation between Beryllium and Aluminium

KVS CBSE Worksheets CHAPTER 1 Electric Charges and Fields Class 12

S-Block Elements || S-block element class 11 chapter 8 || Group 1A, 2A elements || S block elements chapter 8 notes class 11 || Chemistry ||

Electric Charges and Fields || Electrostatics Notes || Physics || Class 12 || Chapter 1 Notes Class 12 ||

Diwali 2020 || Deepawali 2020 || Happy diwali || Festival of lights || 2020 ||