NILGI
atelier

See the Pen 색이 변하는 배경 그라디언트 by nilgi (@nilgi) on CodePen.

 

 

 body {
            margin: 0;
            height: 100vh;
            background: linear-gradient(45deg, #f3efb0, #a8dded, #d9dcef, #ede4e5);
            /* 배경 그라디언트 지정 */

            background-size: 200% 200%;
            animation: gradient 5s ease infinite;
           /* 배경색 변하는 애니메이션 지정 5초 */

 }

        @keyframes gradient {
            0% {
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
            100% {
                background-position: 0% 50%;
            }
        } /* 5초동안 배경색 바꾸는 코드 */

 

+ 최근 글