Created
June 3, 2018 12:44
-
-
Save liquidx/d3ce894f74c53b858d03bf48cbce8219 to your computer and use it in GitHub Desktop.
Anki Audio Meter
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
<!-- in the HTML --> | |
<div class="sentence1 shadow audio"> | |
Playing ... | |
<span id="vu"> | |
<span class="bar"></span> | |
<span class="bar"></span> | |
<span class="bar"></span> | |
<span class="bar"></span> | |
<span class="bar"></span> | |
</span> | |
</div> | |
<!-- in the CSS --> | |
/* audio bars */ | |
#vu { | |
position: relative; | |
height: 20px; | |
} | |
#vu span.bar { | |
display: block; | |
position: absolute; | |
left: 0px; | |
bottom: 6px; | |
width: 9px; | |
height: 5px; | |
background: #666; | |
animation: audio-wave 0.7s infinite ease-in-out; | |
} | |
#vu span.bar:nth-child(2) { | |
left: 11px; | |
height: 20px; | |
animation-delay: 0.1s; | |
animation-duration: 0.5s; | |
} | |
#vu span.bar:nth-child(3) { | |
left: 22px; | |
height: 15px; | |
animation-delay: 0.1s; | |
animation-duration: 1.0s; | |
} | |
#vu span.bar:nth-child(4) { | |
left: 33px; | |
height: 5px; | |
animation-delay: 0.1s; | |
animation-duration: 0.8s; | |
} | |
#vu span.bar:nth-child(5) { | |
left: 44px; | |
height: 12px; | |
animation-delay: 0.15s; | |
animation-duration: 0.7s; | |
} | |
@keyframes audio-wave { | |
0% { height:5px; transform:translateY(0px);} | |
25% {height:20px;transform:translateY(0px);} | |
50% {height:5px;transform:translateY(0px);} | |
100% {height:5px;transform:translateY(0px);} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment