title: Bootstrap 4 carousel fade animation
body: <p>So, I try to make fade animation on Bootstrap 4.0.0 carousel.
  Fade animation on .active are good, but the out animation doesn't happen.</p>
  
  <p>I tried the solution of this question : <a href="https://stackoverflow.com/questions/47796906/bootstrap-4-carousel-fade-transition-not-working">Bootstrap 4: Carousel Fade Transition Not Working</a></p>
  
  <p>The difference is that I'm using backround instead of  tag.
  What is the problem ? Thank you for your answers !</p>
  
  <hr>
  
  <p><strong>Working snippet:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.carousel.carousel-fade .carousel-item {
      opacity: 0;
      transition: opacity ease-out .7s;
  }
  
  .carousel.carousel-fade .carousel-item.active {
      opacity: 1 !important;
  }
  
  .carousel-item{
   height: 500px;
   background-repeat:no-repeat;
      background-position: center;
   background-size:cover; 
  }
  
  .slide1{
   background: green;
  }
  
  .slide2{
   background: red;
  }
  
  .slide3{
   background: yellow;
  }
  
  .slide4{
   background: purple;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="carousel-index" class="carousel carousel-fade slide" data-ride="carousel"&gt;
   &lt;ol class="carousel-indicators"&gt;
    &lt;li data-target="#carousel-index" data-slide-to="0" class="active"&gt;&lt;/li&gt;
    &lt;li data-target="#carousel-index" data-slide-to="1"&gt;&lt;/li&gt;
    &lt;li data-target="#carousel-index" data-slide-to="2"&gt;&lt;/li&gt;
    &lt;li data-target="#carousel-index" data-slide-to="3"&gt;&lt;/li&gt;
   &lt;/ol&gt;
   &lt;div class="carousel-inner"&gt;
    &lt;div class="carousel-item slide1 active"&gt;
     &lt;div class="carousel-caption d-none d-md-block"&gt;
      &lt;h3&gt;Lorem ipsum dolor sit amet, consectetur&lt;/h3&gt;
     &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="carousel-item slide2"&gt;
     &lt;div class="carousel-caption d-none d-md-block"&gt;
      &lt;h3&gt;Lorem ipsum dolor sit amet, consectetur&lt;/h3&gt;
     &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="carousel-item slide3"&gt;
     &lt;div class="carousel-caption d-none d-md-block"&gt;
      &lt;h3&gt;Lorem ipsum dolor sit amet, consectetur&lt;/h3&gt;
     &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="carousel-item slide4"&gt;
     &lt;div class="carousel-caption d-none d-md-block"&gt;
      &lt;h3&gt;Lorem ipsum dolor sit amet, consectetur&lt;/h3&gt;
     &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;
   &lt;a class="carousel-control-prev" href="#carousel-index" role="button" data-slide="prev"&gt;
    &lt;span class="carousel-control-prev-icon" aria-hidden="true"&gt;&lt;/span&gt;
    &lt;span class="sr-only"&gt;Previous&lt;/span&gt;
   &lt;/a&gt;
   &lt;a class="carousel-control-next" href="#carousel-index" role="button" data-slide="next"&gt;
    &lt;span class="carousel-control-next-icon" aria-hidden="true"&gt;&lt;/span&gt;
    &lt;span class="sr-only"&gt;Next&lt;/span&gt;
   &lt;/a&gt;
  &lt;/div&gt;
  
  &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>