html fade out code example

Example 1: css fade out

/* Just add .fade-out class to element */

.fade-out {
	animation: fadeOut 2s;
  	opacity: 0;
}

@keyframes fadeOut {
  from {
  	opacity: 1;
  }
  to {
 	opacity: 0;
  }
}

Example 2: how to fade out images html css

.fade-out {  animation: fadeOut ease 8s;  -webkit-animation: fadeOut ease 8s;  -moz-animation: fadeOut ease 8s;  -o-animation: fadeOut ease 8s;  -ms-animation: fadeOut ease 8s;}@keyframes fadeOut {  0% {    opacity:1;  }  100% {    opacity:0;  }}@-moz-keyframes fadeOut {  0% {    opacity:1;  }  100% {    opacity:0;  }}@-webkit-keyframes fadeOut {  0% {    opacity:1;  }  100% {    opacity:0;  }}@-o-keyframes fadeOut {  0% {    opacity:1;  }  100% {    opacity:0;  }}@-ms-keyframes fadeOut {  0% {    opacity:1;  }  100% {    opacity:0;}

Example 3: css fade out

/* Answer to: "css fade out" */

/*
  With the code below, all you have to do is use JavaScript to
  give the element ".hide-opacity" and it'll fade-out.

  Feel free to edit this code so it works on hover, focus, active
  or any other special selector possible with CSS and of course
  feel free to use this code with your JavaScript too!
*/

.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;
}

Tags:

Html Example