๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
CSS

์• ๋‹ˆ๋ฉ”์ด์…˜2

by Youcodein 2022. 8. 30.
728x90
๋ฐ˜์‘ํ˜•

์• ๋‹ˆ๋ฉ”์ด์…˜ ๋งŒ๋“ค๊ธฐ

HTML๊ณผ CSS๋ฅผ ์ด์šฉํ•˜์—ฌ ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๋งŒ๋“ค์–ด๋ด…์‹œ๋‹ค.

์˜ˆ์‹œ

์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค

HTML ์†Œ์Šค

<div class="loading">>
    <span class="circle1"></span>
    <span class="circle2"></span>
</div>

CSS ์†Œ์Šค

body {
    height: 100vh;
    background-image: linear-gradient(-60deg, #ff5858 0%, #f09819 100%)
    }
    
.loading {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 150px;
    animation: loading 1s ease infinite;
}
    
.loading .circle1 {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
}

.loading .circle2 {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    margin-top: 110px;
}

@keyframes loading {

    0% {
        transform: translate(-50%, -50%) rotate(0deg)
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg)
    }
}

์™„์„ฑ

728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€