css实现进度条动画效果代码

代码语言:html

所属分类:进度条

代码描述:css实现进度条动画效果代码

代码标签: 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html>

<head>
    <style>
        @import url(https://fonts.googleapis.com/css?family=Open+Sans:300);
        *, *:before, *:after {
          box-sizing: border-box;
        }
        
        body {
          font-size: 100%;
          font-family: "Open sans", Arial, sans-serif;
          color: #fff;background-color: #1F1F1F;
        }
        
        .c {
          margin: 12rem auto;
          max-width: 600px;
        }
        @media(max-width: 610px) {
          .c {
            padding: 0 5%;
          }
        }
        .bar {
          height: 40px;
          width: 0;
          transition: width 1.2s ease-in-out;
          position: relative;
          margin: 0.5rem 0;
          border-radius: 4px;
        }
        @media(max-width: 350px) {
          .bar {
            margin: 2.5rem 0 0.5rem;
          }
        }
        .bar.mint {
          background-color: #14C3A2;
          background-image: repeating-linear-gradient(-45deg, #14C3A2, #14C3A2 30px, #22e8c3 30px, #22e8c3 60px);
          background-size: 600px 100%;
          animation: barberpole 12s linear infinite;
          border-bottom: 0.2rem solid #0d7e68;
        }
        .bar.red {
          background-color: #CF4647;
          background-image: repeating-linear-gradient(-45deg, #CF4647, #CF4647 30px, #da6e6f 30px, #da6e6f 60px);
          background-size: 600px 100%;
          animation: barberpole 12s linear infinite;
          border-bottom: 0.2rem solid #9f292a;
        }
        .bar.orange {
          background-color: #EB7B59;
          background-image: repeating-linear-gradient(-45deg, #EB7B59, #EB7B59 30px, #f09f87 30px, #f09f87 60px);
          background-size: 600px 100%;
          animation: barberpole 12s linear infinite;
          border-bottom: 0.2rem solid #dd481b;
        }
        .bar.lila {
          background-color: #524656;
          background-image: repeating-linear-gradient(-45deg, #524656, #524656 30px, #6d5d72 30px, #6d5d72 60px);
          background-size: 600px 100%;
          animation: barberpole 12s linear infinite;
          border-bottom: 0.2rem solid #2a242c;
        }
        .bar.gray {
          background-color: #595B5A;
          background-image: repeating-linear-gradient(-45deg, #595B5A, #595B5A 30px, #727574 30px, #727574 60px);
          background-size: 600px 100%;
          animation: barberpole 12s linear infinite;
          border-bottom: 0.2rem solid #333434;
        }
        .bar.active:after, .bar.active:before {
          opacity: 1;
        }
        .bar:before {
          content: attr(data-skill);
          display: block;
          position: absolute;
          top: 0;
          left: 0;
          padding: 10px;
          height: 40px;
          font-style: italic;
          opacity: 0;
          transition: opacity 2s 0.6s;
        }
        @media(max-width: 350px) {
          .bar:before {
            top: -100%;
            color: #000;
            padding: 10px 0 0;
          }
        }
        .bar:after {
          content: attr(data-percent) "%";
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0