Dart Sass(SCSS) 랜덤으로 숫자 출력 방법
예를들어, 많은 요소들을 반복돌면서 랜덤한 시간동안 변화를 주고 싶다면 아래와 같은 코드를 활용하는 것도 좋다. 단, Darkt Sass만 가능한 문법이다. 아래와 같이 코드를 작성하면 @use "sass:math" as math; @for $i from 1 through 5 { .vidItem:nth-child(#{$i}) { opacity: 0; animation: upAnime #{2.3 * math.random($limit: null)}s ease-in-out 0.8s 1 forwards; } } 아래와 같은 결과를 얻을 수 있음. .youtubeConts .vidItem:nth-child(1) { opacity: 0; animation: upAnime 0.5414398116s ease-in-ou..
2022.01.18