-1

I have a logo in a preloader div that I want to fade out Up after a call. The logo does fadeoutup but becomes visible after it's faded out completely. What I want is to keep it faded out or make it display none with CSS only if possible I can use jquery but rather not.

&.preloader-remove{
            -webkit-animation: fadeOutUp 1s;
            animation: fadeOutUp 1s;
        }

Css Animation

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

  100% {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
}

@keyframes fadeOutUp {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    -ms-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
  }
}

.fadeOutUp {
  -webkit-animation-name: fadeOutUp;
  animation-name: fadeOutUp;
}
Raymond the Developer
  • 1,576
  • 5
  • 26
  • 57

2 Answers2

2

Try using a css transition rather than animation:

&.preloader-remove {
    position: relative;
    top: 50px;
    opacity: 0;
    -webkit-transition: top 1s, opacity 1s;
    transition: top 1s, opacity 1s;
}
3ocene
  • 2,102
  • 1
  • 15
  • 30
1

From the jquery api:http://api.jquery.com/fadeout/

.fadeOut() Description: Hide the matched elements by fading them to transparent.

$( "#clickme" ).click(function() {
  $( "#book" ).fadeOut( "slow", function() {
    // Animation complete.
  });
});
orangerblue
  • 65
  • 10