<div class="wrapper">
<span class="bounce_button">Hover Me</span>
</div>
@keyframes bounce {
0%, 100%, 20%, 50%, 80% {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0)
}
40% {
-webkit-transform: translateY(-30px);
-ms-transform: translateY(-30px);
transform: translateY(-30px)
}
60% {
-webkit-transform: translateY(-15px);
-ms-transform: translateY(-15px);
transform: translateY(-15px)
}
}
span {
position: absolute;
top: 50%;
left: 50%;
height: 180px;
width: 180px;
background-color: red;
border-radius: 50%;
line-height: 180px;
text-align: center;
text-transform: uppercase;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
color: white;
}
span:hover {
cursor: pointer;
animation-name: bounce;
-moz-animation-name: bounce;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.