how to fade out images html css

CSS
<style>
.fade-in {
  animation: fadeIn ease 10s;
  -webkit-animation: fadeIn ease 10s;
  -moz-animation: fadeIn ease 10s;
  -o-animation: fadeIn ease 10s;
  -ms-animation: fadeIn ease 10s;
}
@keyframes fadeIn {
  0% {
    opacity:0;
  }
  100% {
    opacity:1;
  }
}

@-moz-keyframes fadeIn {
  0% {
    opacity:0;
  }
  100% {
    opacity:1;
  }
}

@-webkit-keyframes fadeIn {
  0% {
    opacity:0;
  }
  100% {
    opacity:1;
  }
}

@-o-keyframes fadeIn {
  0% {
    opacity:0;
  }
  100% {
    opacity:1;
  }
}

@-ms-keyframes fadeIn {
  0% {
    opacity:0;
  }
  100% {
    opacity:1;
}
</style>
<div class="fade-in">
   <img src="../images/epic-cat-picture.png">
</div>/* 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;
}.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;}
Source

Also in CSS: