@keyframes (1) 썸네일형 리스트형 javascript로 css의 @keyframes 애니메이션 만들기 HTML CODE // animate를 적용할 root element를 만듭니다. CSS CODE /* root element에 기본적인 style을 적용합니다. */ #root { width: 100px; height: 100px; background-color: #FF0000; } JAVASCRIPT CODE document.getElementById("root").animate( [ // key frames { transform: "translateY(0px)" }, { transform: "translateY(300px)" }, { transform: "translateY(0)" }, ], { // sync options duration: 1000, iterations: Infinity, } );.. 이전 1 다음