Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Last active June 1, 2020 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeMyUI/763b13f1adc7b0254fead899ff858293 to your computer and use it in GitHub Desktop.
Save CodeMyUI/763b13f1adc7b0254fead899ff858293 to your computer and use it in GitHub Desktop.
Easy Animation
- colors = ['#7c4dff', '#0091ea', '#ff9100', '#ff1744']
- colors.each do |color|
.hello{style: "color: #{color}"} easy
.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;
-webkit-text-stroke-width: 3px;
-webkit-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);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment