January 29, 2022

Counter block on scroll using html

<div class="container mt-5">
       <div class="row">
           <div class="col-lg-3 col-md-6">
               <div class="counter-block"> 
               <i class="fa fa-users"></i>
       <h4>Happy Clients</h4>
       <span class="counter">1000</span>
   </div>
           </div>
           <div class="col-lg-3 col-md-6">
               <div class="counter-block"> 
               <i class="fa fa-paper-plane"></i>
       <h4>Experiences Years</h4>
       <span class="counter">7</span>
   </div>
           </div>
           <div class="col-lg-3 col-md-6">
               <div class="counter-block">
               <i class="fa fa-bullhorn"></i> 
       <h4>Awards Won</h4>
       <span class="counter">8</span>
   </div>
           </div>
           <div class="col-lg-3 col-md-6">
               <div class="counter-block"> 
               <i class="fa fa-suitcase"></i>
       <h4>Meetings</h4>
       <span class="counter">500</span>
   </div>
           </div>
           
       </div>
   </div>

 

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    
    <style>
        .counter-block {
    position: relative;
    text-align: center;
    width: 100%;
    display: block;
    margin: 0;
    background: #f7f9fc;
    padding: 20px 10px 15px;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    overflow: hidden;
    -webkit-transition: all 0.2s ease-in-out;
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -ms-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
}
.counter-block::before, .counter-block::after {
    border-style: solid;
    border-width: 1px;
    content: "";
    display: block;
    height: 30px;
    position: absolute;
    width: 30px;
}
.counter-block::before {
    border-color: #11d6f0 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #11d6f0;
    left: 0;
    top: 0;
}
.counter-block::after {
    border-color: rgba(0, 0, 0, 0) #11d6f0 #11d6f0 rgba(0, 0, 0, 0);
    bottom: 0;
    right: 0;
}
.counter-block i {
    position: relative;
    font-size: 40px;
    color: #11d6f0;
}
.counter-block h4 {
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 20px;
} 
        span.counter {
    font-size: 25px;
    font-weight: 500;
}
    </style>

 

 <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Counter-Up/1.0.0/jquery.counterup.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
    <script>
        $(document).ready(function(){
            $('.counter').counterUp({
  delay: 10,
  time: 2000
});
        })
    </script>

 

Leave a Reply

Your email address will not be published. Required fields are marked *