JSFiddle - React, Tailwind, and code Playground

by ksoncan34

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Please Wait Indicator</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div id="please-wait">
        <div class="camera">
            <div class="lens"></div>
            <div class="viewfinder"></div>
            <div class="shutter-button"></div>
        </div>
        <div id="message">Please Wait...</div>
        <div id="error-message">Error
        
        </div>
    </div>
</body>
</html>

CSS

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    font-family: Arial, sans-serif;
}

#please-wait {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.camera {
    position: relative;
    width: 120px;
    height: 80px;
    background-color: #3483fa;
    border-radius: 10px;
    margin-bottom: 10px;
    animation: bounce 2s infinite ease-in-out;
}

.lens {
    position: absolute;
    top: 25px;
    left: 40px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    animation: focus 2s infinite ease-in-out;
}

.viewfinder {
 position: absolute;
    top: 5px;
    left: 10px;
    width: 15px;
    height: 15px;
    background-color: #fff;
    border-radius: 3px;
}

.shutter-button {
    position: absolute;
    top: -5px;
    right: 20px;
    width: 15px;
    height: 5px;
    background-color: #3483fa;    
    border-radius: 3px;
}


#message {
    color: #3483fa;
    font-size: 1.2em;
    animation: fadeIn 2s infinite;
    opacity: 0;
}

#error-message {
  color: #e00000;
  font-size: 1.2rem;
  margin-top: 10px;
}


@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes focus {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}