<h1>Animated download button</h1>
<h3>By ZeroX</h3>
<div class="btn">
  <span>Download</span>
</div>

<div class="bar">
  <div class="p"></div>
</div>
*{
  box-sizing: border-box;
}
html{
  background-color: lighten(black,20%);
  h1,h3{
    color: white;
  }
  text-align: center;
}

.btn{
  width: 150px;
  height: 50px;
  background-color: $fRed;
  color: white;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Raleway";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  cursor: pointer;
  /*border: 2px solid $fWhite;*/
  transition: background-color 0.5s;
  &:hover{
    background-color: $fWhite;
    color: $fRed;
  }
}
.bar{
  width: 200px;
  height: 8px;
  border-radius: 8px;
  background-color: $fBlack;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  display: none;
  .p{
    width: 0%;
    
    border-radius: 8px;
    height: 100%;
    background-color: $fRed;
  }
}
View Compiled
/*
Download button made by ZeroX
*/
$(".btn").click(function(){  /*When user click the button*/
  $("span").fadeOut(); /*Fadeout the download span*/
  $(".btn").animate({  
    width: "50px", /*Animate the width*/
  },function(){
    $(".btn").animate({
      top: "40%", 
    },function(){
      $(".bar").css("display","block"); 
      $(".btn").html('<i class="fa fa-ellipsis-h" aria-hidden="true"></i>');
      $(".p").animate({width:"100%"},2000,function(){
        $(".btn").html('<i class="fa fa-check" aria-hidden="true"></i>');
        $(".bar").fadeOut();
        $(".btn").animate({top:"50%"},function(){
          $(".btn").animate({width:"150px"},function(){
            $(".btn").html("<span>Download</span>");
            $(".p").css("width","0%");
          })
        });
      });
    })
  });
});

External CSS

  1. https://raw.githubusercontent.com/ZeroX-DG/style-helper/master/scss/_FlatColors.scss
  2. https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css
  3. https://fonts.googleapis.com/css?family=Raleway

External JavaScript

  1. https://code.jquery.com/jquery-3.1.0.js