CSS Bounce and Elastic Animations
CSS bounce and elastic animations including bounce, bounceIn, bounceOut, rubberBand, jello, tada, wobble, and swing effects. CSS Bounce and Elastic Animations. These effects give elements a lively and flexible feel, from simple bouncing to elastic stretching and jello like movement. Ideal for buttons, icons, loaders, and entrances all with smooth, reusable CSS code examples and live demos.
Contents
Demo Bounce Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounce {
animation: bounce 1s both infinite;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0) }
40% {transform: translateY(-30px)}
60% {transform: translateY(-15px)}
}Demo Bounce In Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceIn {
animation : bounceIn 1s both infinite;
}
@keyframes bounceIn {
0% {
opacity: 0;
transform: scale(.3);
}
50% {
opacity: 1;
transform: scale(1.05);
}
70% { transform: scale(.9) }
100% { transform: scale(1) }
}Demo Bounce In Up Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceInUp {
animation : bounceInUp 1s both infinite;
}
@keyframes bounceInUp {
0% {
opacity: 0;
transform: translateY(200px);
}
60% {
opacity: 1;
transform: translateY(-30px);
}
80% { transform: translateY(10px) }
100% { transform: translateY(0) }
}Demo Bounce In Left Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceInLeft {
animation : bounceInLeft 1s both infinite;
}
@keyframes bounceInLeft {
0% {
opacity: 0;
transform: translateX(-200px);
}
60% {
opacity: 1;
transform: translateX(30px);
}
80% { transform: translateX(-10px) }
100% { transform: translateX(0) }
}Demo Bounce In Right Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceInRight {
animation : bounceInRight 1s both infinite;
}
@keyframes bounceInRight {
0% {
opacity: 0;
transform: translateX(200px);
}
60% {
opacity: 1;
transform: translateX(-30px);
}
80% { transform: translateX(10px) }
100% { transform: translateX(0) }
}Demo Bounce Out Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceOut {
animation : bounceOut 1s both infinite;
}
@keyframes bounceOut {
0% { transform: scale(1) }
25% { transform: scale(.95) }
50% {
opacity: 1;
transform: scale(1.1);
}
100% {
opacity: 0;
transform: scale(.3);
}
}Demo Bounce Out Down Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceOutDown {
animation : bounceOutDown 1s both infinite;
}
@keyframes bounceOutDown {
0% { transform: translateY(0) }
20% {
opacity: 1;
transform: translateY(-20px);
}
100% {
opacity: 0;
transform: translateY(200px);
}
}Demo Bounce Out Up Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceOutUp {
animation : bounceOutUp 1s both infinite;
}
@keyframes bounceOutUp {
0% { transform: translateY(0) }
20% {
opacity: 1;
transform: translateY(20px);
}
100% {
opacity: 0;
transform: translateY(-200px);
}
}Demo Bounce Out Left Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceOutLeft {
animation : bounceOutLeft 1s both infinite;
}
@keyframes bounceOutLeft {
0% { transform: translateX(0) }
20% {
opacity: 1;
transform: translateX(20px);
}
100% {
opacity: 0;
transform: translateX(-200px);
}
}Demo Bounce Out Right Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.bounceOutRight {
animation : bounceOutRight 1s both infinite;
}
@keyframes bounceOutRight {
0% { transform: translateX(0) }
20% {
opacity: 1;
transform: translateX(-20px);
}
100% {
opacity: 0;
transform: translateX(200px);
}
}Demo Rubber Band Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.rubberBand {
animation : rubberBand 1s both infinite;
}
@keyframes rubberBand {
0% { transform: scale3d(1, 1, 1) }
30% { transform: scale3d(1.25, .75, 1) }
40% { transform: scale3d(0.75, 1.25, 1) }
50% { transform: scale3d(1.15, .85, 1) }
65% { transform: scale3d(.95, 1.05, 1) }
75% { transform: scale3d(1.05, .95, 1) }
100% { transform: scale3d(1, 1, 1)}
}Demo Jello Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.jello {
animation : jello 1s both infinite;
}
@keyframes jello {
0%, 100%, 11.1% {transform: none }
22.2% {transform: skewX(-12.5deg) skewY(-12.5deg) }
33.3% {transform: skewX(6.25deg) skewY(6.25deg) }
44.4% {transform: skewX(-3.125deg) skewY(-3.125deg) }
55.5% {transform: skewX(1.5625deg) skewY(1.5625deg) }
66.6% {transform: skewX(-.78125deg) skewY(-.78125deg) }
77.7% {transform: skewX(0.390625deg) skewY(0.390625deg) }
88.8% {transform: skewX(-.1953125deg) skewY(-.1953125deg) }
}Demo Tada Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.tada {
animation : tada 1s both infinite;
}
@keyframes tada {
0% { transform: scale(1) }
10%, 20% { transform: scale(0.9) rotate(-3deg) }
30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg) }
40%, 60%, 80% { transform: scale(1.1) rotate(-3deg) }
100% { transform: scale(1) rotate(0) }
}Demo Wobble Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.wobble {
animation : wobble 1s both infinite;
}
@keyframes wobble {
0% { transform: translateX(0%) }
15% { transform: translateX(-25%) rotate(-5deg) }
30% { transform: translateX(20%) rotate(3deg) }
45% { transform: translateX(-15%) rotate(-3deg) }
60% { transform: translateX(10%) rotate(2deg) }
75% { transform: translateX(-5%) rotate(-1deg) }
100% { transform: translateX(0%) }
}Demo Swing Animation
.demo-text {
font-size: 18px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.swing {
animation : swing 1s both infinite;
}
@keyframes swing {
20% { transform: rotate(15deg) }
40% { transform: rotate(-10deg) }
60% { transform: rotate(5deg) }
80% { transform: rotate(-5deg) }
100% { transform: rotate(0deg) }
}