@LastGeneral

Почему не работает анимация?

<div class="circle">
  <div class="circle1"></div>
  <div class="circle2"></div>
  <div class="circle3"></div>
</div>

.circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  box-sizing: border-box;
  border: 15px solid rgba(0,0,0,.8);
  border-radius: 50%;
}
.circle1 {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-style: solid;
  border-width: 50%;
  border-color: #f1c40f #e74c3c #9b59b6 #2ecc71;
  box-sizing: border-box;
  animation: animateCircle1 5s linear infinite;
  background: #262626;
}
.circle2 {
  position: absolute;
  top: 16px;
  left: 16px;
  width: calc(100% -40px);
  height: calc(100% -40px);
  border-radius: 50%;
  border: 4px dashed #000;
  animation: animateCircle2 10s linear infinite;
}
.circle3 {
  position: absolute;
  top: 20px;
  left: 20px;
  width: calc(100% -40px);
  height: calc(100% -40px);
  border-radius: 50%;
}
@keyframe animateCircle1 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframe animateCircle2 {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
  • Вопрос задан
  • 77 просмотров
Решения вопроса 1
0xD34F
@0xD34F Куратор тега CSS
@keyframe

@keyframes
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы