는 거의 successs 있습니다css3을 사용하여 볼 바운스 효과를 얻는 방법은 무엇입니까? 사실
이.container{
width: 100%;
height: 100%;
-moz-perspective: 1000px;
}
.flipcard{
background: red;
width: 200px;
height: 300px;
position: absolute;
top: 40px;
left: 20px;
-webkit-transform-style: preserve-3d;
-webkit-transition:all 0.6s ease-in-out;
}
.allowhover:hover{
-webkit-animation-name: bounce;
-webkit-animation-duration: 1.5s;
-webkit-animation-iteration-count: infinite ;
-webkit-animation-direction: normal;
}
@-webkit-keyframes bounce {
25% {
top:7px;
}
45% {
top:40px;
}
64% {
top:19px;
}
76% {
top:40px;
}
96%{
top: 25px
}
100% {
top:40px;
}
}
지금 온라인 예제는 여기에 있습니다 : :
<div class="container">
<div class="flipcard transition allowhover">
<h1>This is card</h1>
</div>
</div>
그때 내가 바운스 효과를 달성하기 위해 CSS3의 애니메이션을 사용 을 나는 div
가 반송 할 필요가 http://jsfiddle.net/GEEtx/
작동하지는 않지만 충분히 좋지 않습니다. key-frames
매개 변수를 공과 같이 바운스하도록 설정해야합니까? b를 계산하는 공식이 있습니까? 요소의 너비와 높이 또는 시간에 따라 온스 높이와 카운트?
나에게 좋을 것 같습니다. '공과 같은'무엇입니까? – mrtsherman