Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="animation-bg" id="animation-bg">
    <div class="wrapper">
        <div class="circle first" id="first">
            <div class="chart-stroke one">
                <div class="chart-stroke two"></div>
            </div>
            <div class="chart-stroke three"></div>
            <div class="chart-stroke four"></div>
            <div class="chart-stroke five"></div>
        </div>
        <div class="circle second" id="second"></div>
        <div class="circle third" id="third"></div>
        <div class="circle fourth" id="fourth"></div>
        <div class="stats">
            <div class="inner">
                <h2>Market Value:</h2>
                <h3>159,900</h3>
                <span class="change">Market Appreciation:</span>
                <div class="chart-wrap">
                    <div class="chart" id="chart"></div>
                </div>
            </div>
        </div>
    </div>
</div>
              
            
!

CSS

              
                $white: #fff;
$trans-circ: rgba(255, 255, 255, 0.42);
$billboard-bg: rgba(#363534, 0.54);
$chart-bg: rgba($white, 0.22);
$completed-bg: rgba($white, 0.7);

*, *:before, *:after {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: 'Gotham Book';
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-book.eot');
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-book.eot?#iefix') format('embedded-opentype'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-book.woff2') format('woff2'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-book.woff') format('woff'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-book.ttf') format('truetype'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-book.svg#gotham-book') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'Gotham';
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-medium.eot');
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-medium.eot?#iefix') format('embedded-opentype'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-medium.woff2') format('woff2'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-medium.woff') format('woff'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-medium.ttf') format('truetype'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/gotham-medium.svg#gotham-medium') format('svg');
    font-weight: normal;
    font-style: normal;

}


.animation-bg {
	background-image: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/82015/animation-bg.jpg");
	background-repeat: no-repeat;
	background-position: center;
	height: 589px;
	width:100%;
}

.wrapper {
	position: relative;
	width:100%;
	height: 100%;
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
}

.circle {
	border-radius: 50%;
	border: 2px solid $white;
	position: absolute;	
  	width: 0;
  	height: 0;	
	
	&.first {
		right: 23.3%;
		top: 51.5%;
	}

	&.second,
	&.third,
	&.fourth {
		background: $trans-circ;
		opacity:0;
	}
	
	&.second {
		right: 38.8%;
		top: 45.5%;	
	}
	
	&.third {
		right: 34%;
		top: 37%;	
	}
	
	&.fourth {
		  top: 35.5%;
		  right: 28%;
	}		
}

.chart-stroke {
	position: absolute;
	width: 2px;
	height: 0;
	left: 0;
	transform-origin: top left;
	border-width: 0 0 0 2px;
	border-style: solid;
	border-color: $white;
	
	&.one {
		transform-origin: bottom left;
		bottom: 101%;
		left: 50%;
		transform: translateX(-50%) rotate(27deg);		
	}
	
	&.two {
		top: 1px;
		left: -1px;
		transform: rotate(-117deg);
	}
	
	&.three,
	&.four,
	&.five {
		border-color: $trans-circ;
	}
	
	&.three {
		top: 30px;
		transform: rotate(98deg);
	}
	
	&.four {
		top: 13px;
		transform: translateX(12px) rotate(123deg);
	}
	
	&.five {
		top: 2px;
		left: 24px;
		transform: rotate(147deg);
	}			
}

.stats {
	color: $white;
	font-family: "Gotham", Helvetica, Arial, sans-serif;
	position: absolute;
	width: 207px;
	height: 0;
	overflow: hidden;
	background: $billboard-bg;
	top: 24.96%;
	right: 27px;
	text-transform: uppercase;
	
	.inner {
		height: 243px - 30px;
		width: 207px - 32px;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
	
	h2 {
		font-size: 14px;
		margin-bottom: 13px;

	}
	
	h3 {
		font-size: 28px;
		font-family: "Gotham Book", Helvetica, Arial, sans-serif;
		margin-bottom: 18px;
	}
	
	.change {
		font-size: 14px;
	}
}

.chart-wrap {
	position: relative;
	height:112px;
	width: 112px;
	margin: 10px auto 0;
}

.chart {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
}

.progressbar-text {
	font-family: "Gotham Book", Helvetica, Arial, sans-serif;
	font-size: 30px;

}

.velocity-animation {
	transition: none !important;
}

.stats-wrapper {
	position: relative;
}


              
            
!

JS

              
                (function($) {
    'use strict';

    var win, startingCircle, firstStroke,
        secondStroke, statsContainer,
        chart, secondCircle, thirdCircle,
        fourthCircle, thirdStroke, fourthStroke,
        fifthStroke;

    function onDocumentReady() {
        win = $(window);
        startingCircle = $(document.getElementById('first'));
        secondCircle = $(document.getElementById('second'));
        thirdCircle = $(document.getElementById('third'));
        fourthCircle = $(document.getElementById('fourth'));
        firstStroke = $('.chart-stroke.one');
        secondStroke = $('.chart-stroke.two');
        thirdStroke = $('.chart-stroke.three');
        fourthStroke = $('.chart-stroke.four');
        fifthStroke = $('.chart-stroke.five');
        statsContainer = $('.stats');

        win.on('load', init);
    }

    function init() {
        startAnimation();
        progressBar();

        setTimeout(stepTwo, 300);
        setTimeout(stepThree, 600);
        setTimeout(stepFour, 900);
        setTimeout(stepFive, 1200);
        setTimeout(stepSix, 1500);
        setTimeout(stepSeven, 2500);
        setTimeout(stepEight, 2800);
        setTimeout(stepNine, 3800);
        setTimeout(stepTen, 4100);
    }

    function startAnimation() {
        startingCircle
            .velocity('stop')
            .velocity({
                height: 87,
                width: 87,
                top: '46.5%',
                right: '20.3%',
            }, 300, 'easeOutCirc');
    }

    function stepTwo() {
        firstStroke
            .velocity('stop')
            .velocity({
                height: 147
            }, 300, 'easeInOutCirc');
    }

    function stepThree() {
        secondStroke
            .velocity('stop')
            .velocity({
                height: 207
            }, 300, 'easeOutCirc');
    }

    function stepFour() {
        statsContainer
            .velocity('stop')
            .velocity({
                height: 283
            }, 1300, [150, 5]);
    }

    function stepFive() {
        thirdStroke.velocity({
            height: 127
        }, {
            duration: 300,
            easing: 'easeInOutCirc',
            begin: function() {
                chart.animate(0, function() {
                    chart.animate(0.058);
                });
            }
        });
    }

    function stepSix() {
        secondCircle
            .velocity('stop')
            .velocity({
                opacity: 0.651,
                height: 57,
                width: 57,
                top: '42.5%',
                right: '36.5%'
            }, 300, 'easeOutCirc');
    }

    function stepSeven() {
        fourthStroke
            .velocity('stop')
            .velocity({
                height: 104
            }, {
                duration: 300,
                easing: 'easeInOutCirc',
                begin: function() {
                    chart.animate(0.058, function() {
                        chart.animate(0.152);
                    });
                }
            });
    }

    function stepEight() {
        thirdCircle
            .velocity('stop')
            .velocity({
                opacity: 0.651,
                height: 71,
                width: 71,
                top: '29.5%',
                right: '32%'
            }, 300, 'easeOutCirc');
    }

    function stepNine() {
        fifthStroke
            .velocity('stop')
            .velocity({
                height: 57
            }, {
                duration: 300,
                easing: 'easeInOutCirc',
                begin: function() {
                    chart.animate(0.152, function() {
                        chart.animate(0.075);
                    });
                }
            });
    }

    function stepTen() {
        fourthCircle
            .velocity('stop')
            .velocity({
                opacity: 0.651,
                height: 47,
                width: 47,
                top: '31.5%',
                right: '26.5%'
            }, 300, 'easeOutCirc');
    }

    function progressBar() {
        chart = new ProgressBar.Circle('#chart', {
            color: 'rgba(255, 255, 255, 0.7)',
            trailColor: 'rgba(255, 255, 255, 0.22)',
            strokeWidth: 12,
            easing: 'easeOutCirc',
            duration: 600,
            text: {
                value: 0 + '%'
            },
            step: function(state, bar) {
                bar.setText((bar.value() * 100).toFixed(1) + '%');
            }
        });
    }

    $(onDocumentReady);

})(jQuery);
              
            
!
999px

Console