Last active
December 19, 2015 02:58
-
-
Save neocoder/5886506 to your computer and use it in GitHub Desktop.
Sonar animation for attention point.
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
.q_done_mrkr { | |
display: inline-block; | |
font-size: 0px; | |
cursor: pointer; | |
margin: 15px 30px; | |
width: 20px; | |
height: 20px; | |
border-radius: 50%; | |
text-align: center; | |
position: absolute; | |
z-index: 1; | |
color: #fff; | |
} | |
.q_done_mrkr:after { | |
pointer-events: none; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
border-radius: 50%; | |
content: ''; | |
-webkit-box-sizing: content-box; | |
-moz-box-sizing: content-box; | |
box-sizing: content-box; | |
box-shadow: none !important; | |
} | |
/* Effect 8 */ | |
.q_done_mrkr { | |
background: rgba(255,255,255,0.1); | |
-webkit-transition: -webkit-transform ease-out 0.1s, background 0.2s; | |
-moz-transition: -moz-transform ease-out 0.1s, background 0.2s; | |
transition: transform ease-out 0.1s, background 0.2s; | |
-webkit-animation-iteration-count: infinite; | |
} | |
.q_done_mrkr:after { | |
top: 0; | |
left: 0; | |
padding: 0; | |
z-index: -1; | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1); | |
opacity: 0; | |
-webkit-transform: scale(0.9); | |
-moz-transform: scale(0.9); | |
-ms-transform: scale(0.9); | |
transform: scale(0.9); | |
-webkit-animation-iteration-count: infinite; | |
} | |
.no-touch .q_done_mrkr:hover { | |
background: rgba(255,255,255,0.05); | |
-webkit-transform: scale(0.93); | |
-moz-transform: scale(0.93); | |
-ms-transform: scale(0.93); | |
transform: scale(0.93); | |
color: #fff; | |
} | |
.q_done_mrkr:after { | |
-webkit-animation: sonarEffect 1.3s ease-out 75ms infinite; | |
-moz-animation: sonarEffect 1.3s ease-out 75ms infinite; | |
animation: sonarEffect 1.3s ease-out 75ms infinite; | |
} | |
@-webkit-keyframes sonarEffect { | |
0% { | |
opacity: 0.3; | |
} | |
40% { | |
opacity: 0.5; | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #ff0000, 0 0 0 10px rgba(255,255,255,0.5); | |
} | |
100% { | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #ff0000, 0 0 0 10px rgba(255,255,255,0.5); | |
-webkit-transform: scale(1.5); | |
opacity: 0; | |
} | |
} | |
@-moz-keyframes sonarEffect { | |
0% { | |
opacity: 0.3; | |
} | |
40% { | |
opacity: 0.5; | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #ff0000, 0 0 0 10px rgba(255,255,255,0.5); | |
} | |
100% { | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #ff0000, 0 0 0 10px rgba(255,255,255,0.5); | |
-moz-transform: scale(1.5); | |
opacity: 0; | |
} | |
} | |
@keyframes sonarEffect { | |
0% { | |
opacity: 0.3; | |
} | |
40% { | |
opacity: 0.5; | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #ff0000, 0 0 0 10px rgba(255,255,255,0.5); | |
} | |
100% { | |
box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 10px 10px #ff0000, 0 0 0 10px rgba(255,255,255,0.5); | |
transform: scale(1.5); | |
opacity: 0; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment