"css"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/JMChristensen/pen/Ablch?limit=all&page=61&q=css" /> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css'><script src='https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js'></script><link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400'> <style class="cp-pen-styles"> #svg circle { stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; stroke: #666; stroke-width: 1em; } #svg #bar { stroke: #FF9F1E; } #cont { display: block; height: 200px; width: 200px; margin: 2em auto; box-shadow: 0 0 1em black; border-radius: 100%; position: relative; } #cont:after { position: absolute; display: block; height: 160px; width: 160px; left: 50%; top: 50%; box-shadow: inset 0 0 1em black; content: attr(data-pct)"%"; margin-top: -80px; margin-left: -80px; border-radius: 100%; line-height: 160px; font-size: 2em; text-shadow: 0 0 0.5em black; } input { color: #000; } /* Make things perty */ html { height: 100%;} body { font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; background-color: #0d0d0d; color: #fff; height: 100%; padding-top: 2em; text-align: center;} h1, h2{ margin: 0; text-transform: uppercase;text-shadow: 0 0 0.5em black;} h2 { font-weight: 300} input { border: 1px solid #666; background: #333; color: #fff; padding: 0.5em; box-shadow: none; outline: none !important; margin: 1em auto; text-align: center;}</style></head><body> <h1>SVG Circle Progress</h1> <h2>Based off of CSS3 circle progress bars</h2> <div id="cont" data-pct="100"> <svg id="svg" width="200" height="200" viewPort="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg"> <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle> <circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle> </svg> </div> <label for="percent">Type a percent!</label> <input id="percent" name="percent"> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script >$('#percent').on('change', function(){ var val = parseInt($(this).val()); var $circle = $('#svg #bar'); if (isNaN(val)) { val = 100; } else{ var r = $circle.attr('r'); var c = Math.PI*(r*2); if (val < 0) { val = 0;} if (val > 100) { val = 100;} var pct = ((100-val)/100)*c; $circle.css({ strokeDashoffset: pct}); $('#cont').attr('data-pct',val); } }); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: