๐Ÿš€์• ๋‹ˆ๋ฉ”์ด์…˜ ๋กœ๋”ฉ ์Šคํ”ผ๋„ˆ | HTML ๋ฐ CSS๐Ÿ’ฏ

10180 ๋‹จ์–ด htmlwebdevbeginnerscss

HTML ๋ฐ CSS๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์• ๋‹ˆ๋ฉ”์ด์…˜ ๋กœ๋”ฉ ์Šคํ”ผ๋„ˆ ์ž์Šต์„œ๋ฅผ ๋นŒ๋“œํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์‹ญ์‹œ์˜ค!





์†Œ์Šค ์ฝ”๋“œ:

๋‚ด์šฉ ๋ฐ ๊ตฌ์กฐ:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Animated Loading Spinner</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>

<div class="spinner">
    Loading...
    <div class="spinner-sector spinner-sector-red"></div>
    <div class="spinner-sector spinner-sector-blue"></div>
    <div class="spinner-sector spinner-sector-green"></div>
    <div class="spinner-sector spinner-sector-orange"></div>
</div> 

</body>
</html>


๋ ˆ์ด์•„์›ƒ ๋ฐ ๋””์ž์ธ

*{
   box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body{
    display: grid;
    place-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.spinner{
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    overflow: hidden;
    position: relative;
    animation: text-fading 2s ease-in-out infinite alternate;
}

@keyframes text-fading {
    0%{
        color: rgba(0,0,0,1);
    }
    50%{
        color: rgba(0,0,0,0.5);
    }
    100%{
        color: rgba(0,0,0,0.1);

    }
}

.spinner-sector{
    position: absolute;
    width: 100%;
    height: 100%;
    /*background: red;*/
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    border: 15px solid transparent;
    mix-blend-mode: overlay;
    animation: rotate var(--duration) var(--timing) infinite;
}

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

.spinner-sector-red{
    border-top-color: #cf2c20;
    --duration: 1.5s;
    --timing: ease-in-out;
}

.spinner-sector-blue{
    border-left-color: #2454df;
    --duration: 2s;
    --timing: ease-in;
}

.spinner-sector-green{
    border-right-color: #258342;
    --duration: 2.5s;
    --timing: ease-out;
}

.spinner-sector-orange{
    border-bottom-color: #f0a204;
    --duration: 3s;
    --timing: ease-in-out;
}


๐Ÿ›ด๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋” ๋งŽ์€ ์ฝ˜ํ…์ธ ๋ฅผ ๋ณด๋ ค๋ฉด ํŒ”๋กœ์šฐํ•˜์„ธ์š”.
https://bit.ly/WDevMadeEasy

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ