counter style : demo 4

1530

Web Design

60

Web Development

380

Brand Building

750

Responsive Design

HTML

                        
1530

Web Design

60

Web Development

CSS

                        .demo{ background: #101c33; }
                        .counter{
                            padding: 30px 20px;
                            border: 5px solid #ff6fca;
                            border-radius: 50px 0 50px 0;
                            text-align: center;
                        }
                        .counter .counter-icon{
                            display: block;
                            font-size: 40px;
                            color: #fff;
                            margin-bottom: 25px;
                        }
                        .counter .counter-value{
                            display: inline-block;
                            width: 200px;
                            height: 80px;
                            line-height: 80px;
                            background: #ff6fca;
                            border-radius: 0 50px 0 50px;
                            font-size: 50px;
                            color: #fff;
                            margin-bottom: 10px;
                        }
                        .counter .title{
                            font-size: 20px;
                            color: #fff;
                            text-transform: uppercase;
                        }
                        .counter.yellow{ border-color: #cbb322; }
                        .counter.blue{ border-color: #23b0d7; }
                        .counter.green{ border-color: #18b335; }
                        .counter.yellow .counter-value{ background: #cbb322; }
                        .counter.blue .counter-value{ background: #23b0d7; }
                        .counter.green .counter-value{ background: #18b335; }
                        @media only screen and (max-width: 1199px) and (min-width: 990px){
                            .counter .counter-value {
                                width: 150px;
                                height: 60px;
                                font-size: 40px;
                                line-height: 60px;
                            }
                        }
                        @media only screen and (max-width: 990px){
                            .counter{ margin-bottom: 20px; }
                        }
                    

JavaScript

(Counter depend on jQuery.)
                        

                        $(document).ready(function(){
                            $('.counter-value').each(function(){
                                $(this).prop('Counter',0).animate({
                                    Counter: $(this).text()
                                },{
                                    duration: 3500,
                                    easing: 'swing',
                                    step: function (now){
                                        $(this).text(Math.ceil(now));
                                    }
                                });
                            });
                        });
                    
License Terms