JSFiddle - React, Tailwind, and code Playground
by rsrsrs
HTML
<div class="float-up">
This is so cool!
If you like it please share...
</div>
CSS
div {
width: 300px;
height: 200px;
background: #66cccc;
color: #333;
font-size: 21px;
font-family: Trebuchet MS;
text-align: center;
}
.float-up {
-webkit-animation-duration:2s;
-moz-animation-duration:2s;
-o-animation-duration:2s;
animation-duration:2s;
-webkit-animation-name:float-up;
-moz-animation-name:float-up;
-o-animation-name:float-up;
animation-name:float-up;
-webkit-animation-iteration-count:1;
-moz-animation-iteration-count:1;
-o-animation-iteration-count:1;
animation-iteration-count:1;
-webkit-animation-timing-function:ease-out;
-moz-animation-timing-function:ease-out;
-o-animation-timing-function:ease-out;
animation-timing-function:ease-out;
-webkit-animation-fill-mode:forwards;
-moz-animation-fill-mode:forwards;
-o-animation-fill-mode:forwards;
animation-fill-mode:forwards;
position:absolute;
top:500px;
}
@-webkit-keyframes float-up {
0% {
top:500px;
opacity:0;
}
25% {
opacity:1;
}
100% {
top:0px;
}
}
@-moz-keyframes float-up {
0% {
top:500px;
opacity:0;
}
25% {
opacity:1;
}
100% {
top:0px;
}
}
@-o-keyframes float-up {
0% {
top:500px;
opacity:0;
}
25% {
opacity:1;
}
100% {
top:0px;
}
}
@-keyframes float-up {
0% {
top:500px;
opacity:0;
}
25% {
opacity:1;
}
100% {
top:0px;
}
}