text fade in css code example
Example 1: css fade in
.fade-in {
animation: fadeIn 2s;
opacity: 1;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
Example 2: css fade out
.successfully-saved {
color: #FFFFFF;
text-align: center;
-webkit-transition: opacity 3s ease-in-out;
-moz-transition: opacity 3s ease-in-out;
-ms-transition: opacity 3s ease-in-out;
-o-transition: opacity 3s ease-in-out;
opacity: 1;
}
.successfully-saved.hide-opacity {
opacity: 0;
}
Example 3: animation fade in css
document.getElementById("test").children[0].className += " load";