- Files
- Index
- Style
- Script
- README
- CDN Add
PLEASE WAIT...
<div class="demo">
<img src="https://robohash.org/skriper" />
<div class="text">
<span>Bounce</span>
<span>In</span>
<span>Animation</span>
</div>
</div>
body,
html {
height: 100%;
}
body {
font-family: system-ui;
background-color: #222;
color: #fff;
padding: 0;
margin: 0;
}
.demo {
display: flex;
flex-direction: column;
height: 100vh;
align-items: center;
}
.demo img {
width: 150px;
height: 150px;
object-fit: contain;
}
.demo .text {
display: flex;
align-items: center;
justify-content: center;
}
.demo img,
.demo .text span {
animation: bounce-in 0.5s linear forwards;
display: block;
margin-left: 16px;
text-transform: uppercase;
font-size: 1.5rem;
opacity: 0;
font-weight: bold;
}
.text img {
animation-delay: 0.2s;
}
.text span:nth-child(1) {
animation-delay: 0.6s;
}
.text span:nth-child(2) {
animation-delay: 0.8s;
}
.text span:nth-child(3) {
animation-delay: 1s;
}
@keyframes bounce-in {
0% {
opacity: 0;
transform: scale(0.3) translate3d(0, 0, 0);
}
50% {
opacity: 0.9;
transform: scale(1.1);
}
80% {
opacity: 1;
transform: scale(0.89);
}
100% {
opacity: 1;
transform: scale(1) translate3d(0, 0, 0);
}
}
// JS