- colors = ['#7c4dff', '#0091ea', '#ff9100', '#ff1744']
- colors.each do |color|
.hello{style: "color: #{color}"} easy
View Compiled
.hello {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 25vw;
animation-name: wave;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
font-family: "Righteous", cursive;
text-stroke-width: 3px;
text-stroke-color: black;
}
@for $i from 1 through 4 {
.hello:nth-of-type(#{$i}) {
animation-duration: 2s;
animation-delay: 0.8s - ($i / 4);
}
}
@keyframes wave {
40%,
50% {
transform: translate(-50%, -65%) scale(1.05);
}
0%,
90%,
100% {
transform: translate(-50%, -45%) scale(0.95);
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.