비전공자 개발일기

Fill Glass Loader 본문

HTML _CSS

Fill Glass Loader

HiroDaegu 2023. 1. 27. 00:40
728x90
SMALL

<!DOCTYPE html>
<html lang="ko">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FILL GLASS LOADER</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="loader"></div>
</body>

</html>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.loader {
    width: 32px;
    height: 72px;
    display: inline-block;
    position: relative;
    border: 2px solid #FFF;
    animation: fill 2s linear infinite alternate;
    color: #2598EB;
    border-radius: 0 0 4px 4px;
    transform: perspective(140px) rotateX(-45deg);
}

@keyframes fill {
    0% {
        box-shadow: 0 0 inset;
    }

    100% {
        box-shadow: 0 -70px inset;
    }
}
728x90
LIST

'HTML _CSS' 카테고리의 다른 글

Rainbow Loader  (0) 2023.01.29
Star Rating  (0) 2023.01.28
Ghost Loader  (0) 2023.01.26
3D Spinning Orbits  (0) 2023.01.25
Pac-man Loader  (0) 2023.01.24