JSFiddle - React, Tailwind, and code Playground
by sinju
HTML
<script src="//code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!--
Bootstrap docs: https://getbootstrap.com/docs
-->
<div class="container">
<div class="row">
<div class="col-12">
<div class="dropboxmain">
<div class="dropbox">
</div>
<div class="dropbox">
</div>
<div class="dropbox">
</div>
<div class="dropbox">
</div>
<div class="dropbox">
</div>
</div>
</div>
</div>
</div>
CSS
.row {
background: #f8f9fa;
margin-top: 20px;
}
.col {
border: solid 1px #6c757d;
padding: 10px;
}
.dropboxmain {
position: relative;
}
.dropbox {
width: 150px;
height: 10px;
margin-top: 10px; position:absolute; top:0px;
}
.dropbox:nth-child(1) {
background: #ff0;
-webkit-animation-name: one;
/* Safari 4.0 - 8.0 */
-webkit-animation-duration:1s;
/* Safari 4.0 - 8.0 */
animation-delay: 5s;
/* Safari 4.0 - 8.0 */
animation-name: one;
animation-duration:1s;
}
@-webkit-keyframes one {
from {
top: 0px;
}
to {
top: 0px;
}
}
@keyframes one {
from {
top: 0px;
}
to {
top: 0px;
}
}
.dropbox:nth-child(2) {
background: #FF6600;
-webkit-animation-name: two;
/* Safari 4.0 - 8.0 */
-webkit-animation-duration:1s;
/* Safari 4.0 - 8.0 */
animation-delay: 4s;
/* Safari 4.0 - 8.0 */
animation-name: two;
animation-duration: 1s;
animation-fill-mode: forwards;
}
@-webkit-keyframes two {
from {
top: 0px;
}
to {
top: 15px;
}
}
@keyframes two {
from {
top: 0px;
}
to {
top: 15px;
}
}
.dropbox:nth-child(3) {
background: #000099;
-webkit-animation-name: three;
/* Safari 4.0 - 8.0 */
-webkit-animation-duration: 1s;
/* Safari 4.0 - 8.0 */
animation-delay: 3s;
/* Safari 4.0 - 8.0 */
animation-name: three;
animation-duration: 1s;
animation-fill-mode: forwards;
}
@-webkit-keyframes three {
from {
top: 0px;
}
to {
top:30px;
}
}
@keyframes three {
from {
top: 0px;
}
to {
top: 30px;
}
}
.dropbox:nth-child(4) {
background: #666633;
-webkit-animation-name: four;
/* Safari 4.0 - 8.0 */
-webkit-animation-duration:1s;
/* Safari 4.0 - 8.0 */
animation-delay: 2s;
/* Safari 4.0 - 8.0 */
animation-name: four;
animation-duration: 1s;
animation-fill-mode: forwards;
}
@-webkit-keyframes four {
from {
top: 0px;
}
to {
top: 45px;
}
}
@keyframes four {
from {
top:...