Bounce Effect on hover the button using css and Html | Sanwebcorner

Bounce Effect on hover the button using css and Html

Bounce Effect on hover the button is one of the simple css3 concept. When hover the button it bounces this effect purely done by using the css3 code. The below following code used to display the bounce effect


@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: 80px;
  width: 180px;
  background-color: green;
  border-radius: 1%;
  line-height: 80px;
  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;
  font-weight:bold;
}
span:hover {
  cursor: pointer;
  animation-name: bounce;
  -moz-animation-name: bounce;
}

Here is the demo link. Check out the demo link to live preview of this example bounce effect. And also the option to download the code you can download and execute file.
I hope this example is very useful




<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Bounce Effect on Hover the button</title>
<style>
@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: 80px;
width: 180px;
background-color: green;
border-radius: 1%;
line-height: 80px;
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;
font-weight:bold;
}
span:hover {
cursor: pointer;
animation-name: bounce;
-moz-animation-name: bounce;
}
</style>

</head>
<body>
<div class="wrapper">
<span class="bounce_button">Hover Me</span>
</div>

<h2><a href="http://sanwebcorner.com">www.sanwebcorner.com</a></h2>
</body>
</html>

Post a Comment

Labels

360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient hide menu Horizontal News ticker Hover Htm Html html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript Jquery js Layered image effect on mouse hover marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form mysql News ticker on hover change text to image our team page password strength checker Photoshop PHP Popup image on click the link pure css Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips Youtube