Skip to content

Instantly share code, notes, and snippets.

@MPieter
Created December 2, 2014 16:24
Show Gist options
  • Save MPieter/f468a286e69fd2578c02 to your computer and use it in GitHub Desktop.
Save MPieter/f468a286e69fd2578c02 to your computer and use it in GitHub Desktop.
Pure CSS Pulse Button
.container {
width: 200px;
height: 100%;
margin: 0 auto 0;
}
.pulse-button {
position: relative;
width: 100px;
height: 100px;
border: none;
box-shadow: 0 0 0 0 rgba(232, 76, 61, 0.7);
border-radius: 50%;
background-color: #e84c3d;
background-image: url(YOUR-URL-IMAGE.png);
background-size:cover;
background-repeat: no-repeat;
cursor: pointer;
-webkit-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
-moz-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
-ms-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
}
.pulse-button:hover
{
-webkit-animation: none;-moz-animation: none;-ms-animation: none;animation: none;
}
@-webkit-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@-moz-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@-ms-keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
@keyframes pulse {to {box-shadow: 0 0 0 45px rgba(232, 76, 61, 0);}}
<div class="container">
<button class="pulse-button"></button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment