css Bootstrap褪色旋转木马

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css Bootstrap褪色旋转木马相关的知识,希望对你有一定的参考价值。

$('.carousel').carousel();
<div id="carousel" class="carousel slide carousel-fade" data-ride="carousel">
    <ol class="carousel-indicators">
        <li data-target="#carousel" data-slide-to="0" class="active"></li>
        <li data-target="#carousel" data-slide-to="1"></li>
        <li data-target="#carousel" data-slide-to="2"></li>
    </ol>
    <!-- Carousel items -->
    <div class="carousel-inner">
        <div class="active item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
    <!-- Carousel nav -->
    <a class="carousel-control left" href="#carousel" data-slide="prev">&lsaquo;</a>
    <a class="carousel-control right" href="#carousel" data-slide="next">&rsaquo;</a>
</div>
.carousel-fade .carousel-inner .item {
  -webkit-transition-property: opacity;
  transition-property: opacity;
}
.carousel-fade .carousel-inner .item,
.carousel-fade .carousel-inner .active.left,
.carousel-fade .carousel-inner .active.right {
  opacity: 0;
}
.carousel-fade .carousel-inner .active,
.carousel-fade .carousel-inner .next.left,
.carousel-fade .carousel-inner .prev.right {
  opacity: 1;
}
.carousel-fade .carousel-inner .next,
.carousel-fade .carousel-inner .prev,
.carousel-fade .carousel-inner .active.left,
.carousel-fade .carousel-inner .active.right {
  left: 0;
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}
.carousel-fade .carousel-control {
  z-index: 2;
}
html,
body,
.carousel,
.carousel-inner,
.carousel-inner .item {
  height: 100%;
}
.item:nth-child(1) {
  background: #74C390;
}
.item:nth-child(2) {
  background: #51BCE8;
}
.item:nth-child(3) {
  background: #E46653;
}

以上是关于css Bootstrap褪色旋转木马的主要内容,如果未能解决你的问题,请参考以下文章

css Bootstrap褪色旋转木马

scss 旋转木马褪色而不是闪光

css Bootstrap淡化旋转木马触摸滑块与文本动画

悬停的Bootstrap旋转木马标题

html Bootstrap推荐旋转木马

我如何将我的旋转木马放在中心位置?