Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Fade Out Up Big Animation Effect with CSS
The CSS Fade Out Up Big animation creates a dramatic exit effect where an element fades out while moving upward by a large distance. This animation is perfect for removing elements with an impactful visual transition.
Syntax
@keyframes fadeOutUpBig {
0% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(-2000px);
}
}
.fadeOutUpBig {
animation-name: fadeOutUpBig;
animation-duration: 1s;
animation-fill-mode: both;
}
Example
The following example demonstrates the fade out up big animation effect on a colored box −
<!DOCTYPE html>
<html>
<head>
<style>
.animated-box {
width: 200px;
height: 150px;
background: linear-gradient(45deg, #ff6b6b, #ee5a24);
margin: 50px auto;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 18px;
font-weight: bold;
animation-duration: 2s;
animation-fill-mode: both;
}
@keyframes fadeOutUpBig {
0% {
opacity: 1;
transform: translateY(0);
}
100% {
opacity: 0;
transform: translateY(-2000px);
}
}
.fadeOutUpBig {
animation-name: fadeOutUpBig;
}
button {
display: block;
margin: 20px auto;
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="animated-box fadeOutUpBig">Fade Out Up Big</div>
<button onclick="location.reload()">Reload Animation</button>
</body>
</html>
A gradient-colored box with "Fade Out Up Big" text appears and then fades out while moving upward dramatically, disappearing completely off the top of the screen. A reload button allows you to restart the animation.
Key Properties
| Property | Value | Description |
|---|---|---|
opacity |
1 to 0 | Element fades from fully visible to invisible |
transform |
translateY(-2000px) | Moves element 2000px upward |
animation-fill-mode |
both | Maintains final state after animation |
Conclusion
The Fade Out Up Big animation combines opacity and large upward movement to create a powerful exit effect. It's ideal for removing modal dialogs, notifications, or any element that needs a dramatic departure animation.
Advertisements
