如何制作动画旋转木马Bootstrap.js
问题描述:
使用回调内部子元素“滑”在Twitter上bootstrap.js,我试图动画作品从幻灯片过渡到滑动后个别:如何制作动画旋转木马Bootstrap.js
<div class="carousel">
<div class="item active">
<img src="animatefirst.png">
<h1> second </h1>
<p> third <p>
</div>
<div class="item">
<img src="animatefirst.png">
<h1> second </h1>
<p> third <p>
</div>
<div class="item">
<img src="animatefirst.png">
<h1> second </h1>
<p> third <p>
</div>
</div>
由于你可以看到,我想动画以下顺序:
- IMG
- H1
- p
我该怎么做?
到目前为止,这是我所能做的。
$('#carousel2').bind('slid', function(){
$('img').fadeIn();
});
但上述的问题是,它在全部图像一次一次的第一张幻灯片,被“下滑”淡入是否有办法让我把目标放在div内的图像并逐一淡化它们?
答
对于任何人在那里,我找到了解决办法:
引导附加一个名为“主动”在转盘当前项类。
我刚刚使用了一个派生选择器来定位我需要动画的所有子元素,以及动画!