Last active
June 1, 2020 00:00
-
-
Save CodeMyUI/763b13f1adc7b0254fead899ff858293 to your computer and use it in GitHub Desktop.
Easy Animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- colors = ['#7c4dff', '#0091ea', '#ff9100', '#ff1744'] | |
- colors.each do |color| | |
.hello{style: "color: #{color}"} easy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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