I basically just want to know how to make this:
http://codepen.io/rjtkoh/pen/OPeNWP
.timerwrapper {
height: 60px;
width: 100%;
background: #484949;
position: relative;
margin: auto;
}
shrinking($item, $duration) {
$duration = unit($duration, 's');
{$item} {
width: 0%;
height: 60px;
position: absolute;
bottom: 0;
animation: fillBar $duration ease-in infinite;
background-image: linear-gradient(to right, #f00439, #f28d0d);
}
@keyframes fillBar {
0% {
width: 100%;
}
100% {
width: 0%;
}
}
}
// Premier parametre : container class
// Second parametre : temps de l'animation en secondes
shrinking('.shrinking', 60);
I have taken the introductory JS tutorials on Codecademy and Treehouse. However I don't feel I know enough to understand what's going on in that Codepen. I would like to recreate what's there in regular CSS/Javascript, without Stylus.
Could someone point me in the direction of some good tutorials that would be relevant in creating this timer?
So basically I just want a bar that shrinks as a set time limit goes down.
Thanks.