SOURCE

console 命令行工具 X clear

                    
>
console
<div class="donut">
  <svg width="240" height="240" xmlns="http://www.w3.org/2000/svg" class="donut__svg">
    <circle id="donut-graph-x" class="donut__svg__scrim" r="90" cy="120" cx="120" stroke-width="3" stroke="#333" fill="none"/>
    <circle id="donut-graph" class="donut__svg__circle--one" r="90" cy="120" cx="120" stroke-width="4" stroke="url(#purple)" stroke-linejoin="round" stroke-linecap="round" fill="none"/>
    
    <defs>
      <linearGradient id="purple" x1="0%" y1="0%" x2="100%" y2="0%">
        <stop offset="0%"   stop-color="#7a5bcf"/>
        <stop offset="100%" stop-color="#8A6FD5"/>
      </linearGradient>
    </defs>
    
  </svg>
  <div class="donut__copy">
    <span class="donut__title">82<span class="donut__spic">%</span></span>
  </div>
</div>

<span class="info"><a href="http://alexpate.uk/journal/pure-svg-progress-circles/" target="_blank">Accompanying article</a></span>
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0 0;
  padding: 0;
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #212121;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 100%;
  height: 100%;
}

.donut {
  position: relative;
  width: 240px;
  height: 240px;
}

.donut__copy {
  text-align: center;
  width: 100%;
  height: 100%;
  padding-top: 68px;
  top: 0;
  left: 0;
  position: absolute;
}

.donut__title,
.donut__secondary {
  display: block;
  margin: 0;
  padding: 0;
}

.donut__title,
.donut__spic {
  color: #8a6fd5;
  font-weight: 200;
}

.donut__title {
  font-size: 79px;
  position: relative;
  -webkit-animation: donutTitleFadeLeft 800ms 200ms cubic-bezier(0.99, 0.01, 0.22, 0.94) forwards;
          animation: donutTitleFadeLeft 800ms 200ms cubic-bezier(0.99, 0.01, 0.22, 0.94) forwards;
  opacity: 0;
  -webkit-transform: translateX(0);
          transform: translateX(0);
}

.donut__spic {
  position: absolute;
  top: 20px;
  font-size: 30px;
  line-height: 1em;
  content: "%";
  -webkit-animation: donutTitleFadeRight 800ms 200ms cubic-bezier(0.99, 0.01, 0.22, 0.94) forwards;
          animation: donutTitleFadeRight 800ms 200ms cubic-bezier(0.99, 0.01, 0.22, 0.94) forwards;
  opacity: 0;
  -webkit-transform: translateY(-20px);
          transform: translateY(-20px);
}

@-webkit-keyframes donutTitleFadeLeft {
  from {
    opacity: 0;
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
  to {
    opacity: 1;
    -webkit-transform: translateX(-10px);
            transform: translateX(-10px);
  }
}

@keyframes donutTitleFadeLeft {
  from {
    opacity: 0;
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
  to {
    opacity: 1;
    -webkit-transform: translateX(-10px);
            transform: translateX(-10px);
  }
}
@-webkit-keyframes donutTitleFadeRight {
  from {
    opacity: 0;
    -webkit-transform: translateX(-20px);
            transform: translateX(-20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
}
@keyframes donutTitleFadeRight {
  from {
    opacity: 0;
    -webkit-transform: translateX(-20px);
            transform: translateX(-20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
}
.donut__svg {
  -webkit-transform: rotate(-90deg);
          transform: rotate(-90deg);
}

.donut__svg__circle--one {
  stroke-dasharray: 565.48668;
  stroke-dashoffset: 565.48668;
}

.donut__svg__circle--one {
  -webkit-animation: donut-show-one 1200ms cubic-bezier(0.99, 0.01, 0.62, 0.94) 0.5s forwards;
          animation: donut-show-one 1200ms cubic-bezier(0.99, 0.01, 0.62, 0.94) 0.5s forwards;
  -webkit-transition: stroke-dasharray 400ms ease-in-out;
  transition: stroke-dasharray 400ms ease-in-out;
}

@-webkit-keyframes donut-show-one {
  to {
    stroke-dashoffset: 101.7876;
  }
}

@keyframes donut-show-one {
  to {
    stroke-dashoffset: 101.7876;
  }
}
.info {
  font-size: 14px;
  color: #999;
  position: absolute;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
  bottom: 40px;
  width: 100%;
  left: 0;
  text-align: center;
}
.info a {
  color: #999;
}