Created
January 12, 2016 01:37
-
-
Save anonymous/f3aec7e6d578ef1d05ef to your computer and use it in GitHub Desktop.
Pulse button // source http://jsbin.com/soligo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Pulse button</title> | |
<style id="jsbin-css"> | |
body, html { | |
height: 100%; | |
background: #fff; | |
} | |
.container { | |
width: 200px; | |
height: 100%; | |
margin: 0 auto 0; | |
-webkit-perspective: 1000; | |
-webkit-backface-visibility: hidden; | |
background: #fff; | |
} | |
.pulse-button { | |
position: relative; | |
top: 50%; | |
left: 50%; | |
margin-left: -50px; | |
margin-top: -50px; | |
display: block; | |
width: 100px; | |
height: 100px; | |
font-size: 1.3em; | |
font-weight: light; | |
font-family: 'Trebuchet MS', sans-serif; | |
text-transform: uppercase; | |
text-align: center; | |
line-height: 100px; | |
letter-spacing: -1px; | |
color: white; | |
border: none; | |
border-radius: 50%; | |
background: #5a99d4; | |
cursor: pointer; | |
box-shadow: 0 0 0 0 rgba(90, 153, 212, 0.5); | |
-webkit-animation: pulse 1.5s infinite; | |
} | |
.pulse-button { | |
-webkit-animation: none; | |
} | |
.pulse-button:hover { | |
-webkit-animation: pulse 1.5s infinite; | |
} | |
@-webkit-keyframes pulse { | |
0% { | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
-webkit-transform: scale(0.9); | |
transform: scale(0.9); | |
} | |
70% { | |
-moz-transform: scale(1); | |
-ms-transform: scale(1); | |
-webkit-transform: scale(1); | |
transform: scale(1); | |
box-shadow: 0 0 0 50px rgba(90, 153, 212, 0); | |
} | |
100% { | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
-webkit-transform: scale(0.9); | |
transform: scale(0.9); | |
box-shadow: 0 0 0 0 rgba(90, 153, 212, 0); | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class='container'> | |
<span class='pulse-button'>pulse</span> | |
</div> | |
<script id="jsbin-source-css" type="text/css"> | |
body, html { | |
height: 100%; | |
background: #fff; | |
} | |
.container { | |
width: 200px; | |
height: 100%; | |
margin: 0 auto 0; | |
-webkit-perspective: 1000; | |
-webkit-backface-visibility: hidden; | |
background: #fff; | |
} | |
.pulse-button { | |
position: relative; | |
top: 50%; | |
left: 50%; | |
margin-left: -50px; | |
margin-top: -50px; | |
display: block; | |
width: 100px; | |
height: 100px; | |
font-size: 1.3em; | |
font-weight: light; | |
font-family: 'Trebuchet MS', sans-serif; | |
text-transform: uppercase; | |
text-align: center; | |
line-height: 100px; | |
letter-spacing: -1px; | |
color: white; | |
border: none; | |
border-radius: 50%; | |
background: #5a99d4; | |
cursor: pointer; | |
box-shadow: 0 0 0 0 rgba(90, 153, 212, 0.5); | |
-webkit-animation: pulse 1.5s infinite; | |
} | |
.pulse-button { | |
-webkit-animation: none; | |
} | |
.pulse-button:hover { | |
-webkit-animation: pulse 1.5s infinite; | |
} | |
@-webkit-keyframes pulse { | |
0% { | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
-webkit-transform: scale(0.9); | |
transform: scale(0.9); | |
} | |
70% { | |
-moz-transform: scale(1); | |
-ms-transform: scale(1); | |
-webkit-transform: scale(1); | |
transform: scale(1); | |
box-shadow: 0 0 0 50px rgba(90, 153, 212, 0); | |
} | |
100% { | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
-webkit-transform: scale(0.9); | |
transform: scale(0.9); | |
box-shadow: 0 0 0 0 rgba(90, 153, 212, 0); | |
} | |
} | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body, html { | |
height: 100%; | |
background: #fff; | |
} | |
.container { | |
width: 200px; | |
height: 100%; | |
margin: 0 auto 0; | |
-webkit-perspective: 1000; | |
-webkit-backface-visibility: hidden; | |
background: #fff; | |
} | |
.pulse-button { | |
position: relative; | |
top: 50%; | |
left: 50%; | |
margin-left: -50px; | |
margin-top: -50px; | |
display: block; | |
width: 100px; | |
height: 100px; | |
font-size: 1.3em; | |
font-weight: light; | |
font-family: 'Trebuchet MS', sans-serif; | |
text-transform: uppercase; | |
text-align: center; | |
line-height: 100px; | |
letter-spacing: -1px; | |
color: white; | |
border: none; | |
border-radius: 50%; | |
background: #5a99d4; | |
cursor: pointer; | |
box-shadow: 0 0 0 0 rgba(90, 153, 212, 0.5); | |
-webkit-animation: pulse 1.5s infinite; | |
} | |
.pulse-button { | |
-webkit-animation: none; | |
} | |
.pulse-button:hover { | |
-webkit-animation: pulse 1.5s infinite; | |
} | |
@-webkit-keyframes pulse { | |
0% { | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
-webkit-transform: scale(0.9); | |
transform: scale(0.9); | |
} | |
70% { | |
-moz-transform: scale(1); | |
-ms-transform: scale(1); | |
-webkit-transform: scale(1); | |
transform: scale(1); | |
box-shadow: 0 0 0 50px rgba(90, 153, 212, 0); | |
} | |
100% { | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
-webkit-transform: scale(0.9); | |
transform: scale(0.9); | |
box-shadow: 0 0 0 0 rgba(90, 153, 212, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment