我試圖在純CSS的IMAGES動畫的結尾處創建反彈效果,但是我有3個圖像,我希望每個圖像具有不同時間格式的反彈效果。由於我的CSS只適用於一個圖像如何更改此CSS的格式?如何使用PURE CSS創建CSS3反彈效果
請告知
這是我到目前爲止有:
@-webkit-keyframes bounce {
0%, 20%, 53%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
40%,
43% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -30px, 0);
transform: translate3d(0, -30px, 0);
}
70% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -15px, 0);
transform: translate3d(0, -15px, 0);
}
90% {
-webkit-transform: translate3d(0, -4px, 0);
transform: translate3d(0, -4px, 0);
}
}
@keyframes bounce {
0%, 20%, 53%, 80%, 100% {
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
40%,
43% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -30px, 0);
transform: translate3d(0, -30px, 0);
}
70% {
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
-webkit-transform: translate3d(0, -15px, 0);
transform: translate3d(0, -15px, 0);
}
90% {
-webkit-transform: translate3d(0, -4px, 0);
transform: translate3d(0, -4px, 0);
}
}
.bounce {
-webkit-animation-name: bounce;
animation-name: bounce;
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
.animated {
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
<ul class="clearfix">
<div id="ubercontainer">
<div id="container">
<img src="../images/sideGAME1.jpg"/class="sideGMimg5">
<li class="bounce animated ">
<img src="../images/sideGAME2.jpg "/class="sideGMimg1 ">
<span class="Jacpots_1">Major Millions</span>
<br />
<span id="firstword" class="introchange1">$6 231 515.23</span>
</li>
<li class="bounce2 animated2">
<img src="../images/sideGAME3.jpg"/class="sideGMimg2">
<span class="Jacpots_2 ">Mega Moolah</span>
<br />
<span id="secondword " class="introchange2 ">$6 231 515.23</span>
</li>
<li class="bounce3 animated3 ">
<img src="../images/sideGAME4.jpg "/class="sideGMimg3 ">
<span class="Jacpots_3">Mega Moolah Isis</span>
<br />
<span id="thirdword" class="introchange3">$6 231 515.23</span>
</li>
</div>
</div>
<!-- <span class="Jacpots_1">abc</span> -->
</ul>
試試這個網址:http://css-stars.com/bouncing-balls-css3-animation/ –