Не работает progress bar
Суть его в том что у меня 10 вопросов(в проекте), и 11 квадратиков в прогресс баре, прогресс бар прибавляется и меняет ширину в положительную сторону, а "пустая часть" меняется в отрицательную(изменения с помощью анимации). Но у меня перестала работать анимация "пустой" части.
.bar1 {
width: 32px;
height: 30px;
background: #7cbe68;
}
.bar2 {
width: 30px;
height: 30px;
margin-left: 30px;
margin-top: -30px;
background: #7cbe68;
}
.bar3 {
width: 30px;
height: 30px;
margin-left: 60px;
margin-top: -30px;
background: #7cbe68;
}
.bar4 {
width: 30px;
height: 30px;
margin-left: 90px;
margin-top: -30px;
background: #7cbe68;
}
.bar5 {
width: 30px;
height: 30px;
margin-left: 120px;
margin-top: -30px;
background: #7cbe68;
}
.bar6 {
width: 30px;
height: 30px;
margin-left: 150px;
margin-top: -30px;
background: #7cbe68;
}
.bar7 {
width: 30px;
height: 30px;
margin-left: 180px;
margin-top: -30px;
background: #7cbe68;
}
.bar8 {
width: 30px;
height: 30px;
margin-left: 210px;
margin-top: -30px;
background: #7cbe68;
animation-name: bar;
animation-duration: 3s;
}
.bar9 {
width: 30px;
height: 30px;
margin-right: 195px;
margin-top: -30px;
background: #313131;
float: right;
animation-name: bar0;
animation-duration: 3s;
}
.bar10 {
width: 30px;
height: 30px;
margin-left: 240px;
margin-top: -30px;
background: #313131;
}
.bar11 {
width: 30px;
height: 30px;
margin-left: 270px;
margin-top: -30px;
background: #313131;
}
@keyframes bar {
0% {
width: 0px;
}
100% {
width: 30px;
}
}
@keyframes bar0 {
0% {
width: 60px;
}
100% {
width: 30px;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Тест</title>
<link rel="stylesheet" href="style9.css">
</head>
<body>
<div class="hat">
<h1 class="h11">Questionnaire</h1>
<div class="ProgressBar">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
<div class="bar4"></div>
<div class="bar5"></div>
<div class="bar6"></div>
<div class="bar7"></div>
<div class="bar8"></div>
<div class="bar9"></div>
<div class="bar10"></div>
<div class="bar11"></div>
</div>
</body>