だから私は3つの画像をゆっくりと重ね合わせてフェードしようとしています. ここでこのチュートリアルに従っています。しかし、何らかの理由で、私の画像は互いにフェードアウトするのが速すぎて、タイミングをうまく制御できません。
これが私のプレビューページです。鳥、トマト、ボートが見られるはずですが、今はすべてが重なり合ってボートに乗ってしまいます。
Demo 1 と Demo 3 をフォローしていますが、アニメーションがオフになっている理由はありますか? 前もって感謝します!:)
私の jsfiddle: http://jsfiddle.net/leongaban/TPjWG/
コード:
<style>
@-webkit-keyframes cf4FadeInOut {
0% {
opacity:0;
}
25% {
opacity:1;
}
50% {
opacity:1;
}
100% {
opacity:1;
}
}
@-moz-keyframes cf4FadeInOut {
0% {
opacity:0;
}
25% {
opacity:1;
}
50% {
opacity:1;
}
100% {
opacity:1;
}
}
@-ms-keyframes cf4FadeInOut {
0% {
opacity:0;
}
25% {
opacity:1;
}
50% {
opacity:1;
}
100% {
opacity:1;
}
}
#cf4a {
position:relative;
height:250px;
width:300px;
margin:0 auto;
}
#cf4a img {
position:absolute;
left:0;
}
#cf4a img {
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: 1;
-webkit-animation-duration: 30s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: 1;
-moz-animation-duration: 30s;
-ms-animation-name: cf4FadeInOut;
-ms-animation-timing-function: ease-in-out;
-ms-animation-iteration-count: 1;
-ms-animation-duration: 30s;
}
#cf4a img:nth-of-type(1) {
-webkit-animation-delay: 0;
-moz-animation-delay: 0;
-ms-animation-delay: 0;
}
#cf4a img:nth-of-type(2) {
-webkit-animation-delay: 30s;
-moz-animation-delay: 30s;
-ms-animation-delay: 30s;
}
#cf4a img:nth-of-type(3) {
-webkit-animation-delay: 60s;
-moz-animation-delay: 60s;
-ms-animation-delay: 60s;
}
</style>
<div id="cf4a">
<a href="http://http://stackoverflow.com/" target="_blank"><img src="img/bird1.jpg" /></a>
<a href="http://http://stackoverflow.com/" target="_blank"><img src="img/tomato2.jpg" /></a>
<a href="http://http://stackoverflow.com/" target="_blank"><img src="img/boat3.jpg" /></a>
</div>