Skip to content

Instantly share code, notes, and snippets.

@filipecrosk
Last active September 22, 2017 21:36
Show Gist options
  • Save filipecrosk/020861a3e4a93be335706b58e9702c94 to your computer and use it in GitHub Desktop.
Save filipecrosk/020861a3e4a93be335706b58e9702c94 to your computer and use it in GitHub Desktop.
Pulse Animation
<style type="text/css">
.hp-pulse-wrapper{z-index:99995}
.hp-pulse{height:18px;width:18px;position:absolute}
.hp-pulse:before,.hp-pulse:after{position:absolute;margin-top:-63px;margin-left:-63px;content:' ';background-color:rgba(0,126,229,0.1);border-radius:72px;height:144px;width:144px;opacity:0}
.hp-pulse:before{-webkit-animation:pulse-zero 1.5s ease-out infinite;animation:pulse-zero 1.5s ease-out infinite}
.hp-pulse:after{-webkit-animation:pulse-one 1.5s ease-out infinite;animation:pulse-one 1.5s ease-out infinite}
.hp-pulse-button{cursor:pointer;height:82px;width:82px;border-radius:41px;border:none;position:absolute;z-index:100002;top:-32px;left:-32px;background-color:transparent}
.hp-pulse-button:after{content:' ';display:block;position:absolute;top:32px;left:32px;background-color:#007ee5;box-shadow:0 0 0 3px #fff,0 3px 8px 3px rgba(0,0,0,0.2);width:18px;height:18px;border-radius:9px}
.hp-pulse-button.has-children:after{display:none}@-webkit-keyframes pulse-zero{0%{opacity:1;-webkit-transform:scale(.1);transform:scale(.1)}75%{opacity:.5}100%{opacity:0;-webkit-transform:scale(1.25);transform:scale(1.25)}}@keyframes pulse-zero{0%{opacity:1;-webkit-transform:scale(.1);transform:scale(.1)}75%{opacity:.5}100%{opacity:0;-webkit-transform:scale(1.25);transform:scale(1.25)}}@-webkit-keyframes pulse-one{0%{opacity:1;-webkit-transform:scale(.1);transform:scale(.1)}25%{opacity:1;-webkit-transform:scale(.1);transform:scale(.1)}75%{opacity:.75}100%{opacity:0;-webkit-transform:scale(1.125);transform:scale(1.125)}}@keyframes pulse-one{0%{opacity:1;-webkit-transform:scale(.1);transform:scale(.1)}25%{opacity:1;-webkit-transform:scale(.1);transform:scale(.1)}75%{opacity:.75}100%{opacity:0;-webkit-transform:scale(1.125);transform:scale(1.125)}}
</style>
<div class="hp-pulse-wrapper tether-element tether-enabled tether-element-attached-middle tether-element-attached-center tether-target-attached-bottom tether-target-attached-left" style="top: 0px; left: 0px; position: absolute; transform: translateX(50px) translateY(50px) translateZ(0px);">
<div class="hp-pulse " data-reactid=".3r">
<button class="hp-pulse-button " data-reactid=".3r.0"></button>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment