Skip to content

Instantly share code, notes, and snippets.

@kapusta
Created October 11, 2012 17:21
Show Gist options
  • Save kapusta/3874051 to your computer and use it in GitHub Desktop.
Save kapusta/3874051 to your computer and use it in GitHub Desktop.
CSS3 Pulse Ring
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS3 Pulse Ring</title>
<style>
.gps_ring {
border: 3px solid #999;
-webkit-border-radius: 32px;
border-radius: 32px;
height: 20px;
width: 20px;
-webkit-animation: pulsate 1s ease-out;
-webkit-animation-iteration-count: 3;
animation: pulsate 1s ease-out;
animation-iteration-count: 3;
opacity: 0.0
}
/* webkit - safari, chrome */
@-webkit-keyframes pulsate {
0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;}
50% {opacity: 1.0;}
100% {-webkit-transform: scale(1.2, 1.2); opacity: 0.0;}
}
/* no vendor prefix - firefox */
@keyframes pulsate {
0% { transform: scale(0.1, 0.1); opacity: 0.0; }
50% { opacity: 1.0; }
100% { transform: scale(1.2, 1.2); opacity: 0.0; }
}
</style>
</head>
<body>
<div class="gps_ring"></div>
<!--
original source
* http://stackoverflow.com/questions/4910963/how-to-create-a-pulse-effect-using-web-kit-animation-outward-rings
no ie9 support?
* http://caniuse.com/#feat=css-animation
* http://msdn.microsoft.com/en-us/library/ms533014(VS.85,loband).aspx
fiddle with it
* http://jsfiddle.net/dankapusta/D5gCB/
-->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment