css+div布局实现技能柱状图图表动画效果代码

代码语言:html

所属分类:图表

代码描述:css+div布局实现技能柱状图图表动画效果代码

代码标签: css div 布局 技能 柱状图 图表 动画

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>
*{
  margin: 0;
  padding: 0;
  font-family: "Ubuntu", sans-serif;
  box-sizing: border-box;
}

body{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.skills{
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.skill-name{
  font-size: 18px;
  font-weight: 700;
  color: #f1f1f1;
  text-transform: uppercase;
  margin: 20px 0;
}

.skill-bar{
  height: 14px;
  background: #444;
  border-radius: 3px;
}

.skill-per{
  height: 14px;
  background: linear-gradient(135deg,#ed4d5e,#7008cb 31%,#3f0198 69%,#1bb7f7);
  border-radius: 3px;
  position: relative;
  animation: fillBars 3.5s 1;
}

.skill-per::before{
  content: attr(per);
  position: absolute;
  padding: 4px 6px;
  background: #f1f1f1;
  border-radius: 4px;
  font-size: 12px;
  top: -35px;
  right: 0;
  transform: translateX(50%);
}

.skill-per::after{
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #f1f1f1;
  top: -20px;
  right: 0;
  transform: translateX(50%) rotate(45deg);
  border-radius: 2px;
}

@keyframes fillBars{
  from{
    width: 0;
  }
  to{
    width: 100%;
  }
}
</style>


  
</head>

<body translate="no">
  <div class="skills">
   
   <div class="skill">
    <div class="skill-name">Javascript</div>
    <div class="skill-bar">
      <div class="skill-per" per="100%" style="max-width:100%"></div>
    </div>
  </div>
   
   <div class="skill">
    <div class="skill-name">Javascript</div>
    <div class="skill-bar">
      <div cl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0