Bootstrap Carousel不在IE中工作

时间:2015-03-20 20:27:07

标签: jquery twitter-bootstrap internet-explorer carousel

我有一个旋转木马,它会在下一张幻灯片中消失。我在Chrome和Firefox中运行良好,但在IE中似乎没有淡入或淡出。对于如何解决这个问题,有任何的建议吗?这是一些类似于我的代码:

HTML:

<div id="carousel" class="carousel slide carousel-fade">
 <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>

<div class="carousel-inner">
  <div class="active item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>

<a class="carousel-control left" href="#carousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#carousel" data-slide="next">›</a>
</div>

CSS:

.carousel-fade .carousel-inner .item {
 opacity: 0;
-webkit-transition-property: opacity;
-moz-transition-property: opacity;
-o-transition-property: opacity;
 transition-property: opacity;
 }
.carousel-fade .carousel-inner .active {
opacity: 1;
}
.carousel-fade .carousel-inner .active.left,
.carousel-fade .carousel-inner .active.right {
  left: 0;
  opacity: 0;
  z-index: 1;
}
.carousel-fade .carousel-inner .next.left,
.carousel-fade .carousel-inner .prev.right {
  opacity: 1;
}
.carousel-fade .carousel-control {
  z-index: 2;
}
html,
body,
.carousel,
.carousel-inner,
.carousel-inner .item {
   height: 100%;
}
.item:nth-child(1) {
  background: silver;
}
.item:nth-child(2) {
  background: red;
}
.item:nth-child(3) {
  background: orange;
}

JS:

$('#carousel').carousel();

0 个答案:

没有答案