
.single:nth-child(odd) {
  opacity: 1;
  background-color: aliceblue;
  box-shadow: 1px 1px 5px greenyellow;
  animation: box1 1s linear 0s infinite alternate;
}

.single:nth-child(even) {
  opacity: 0.3;
  background-color: coral;
  box-shadow: none;
  animation: box2 1.2s linear 0s infinite alternate;
}

@keyframes box1 {
  from {
      opacity: 1;
      box-shadow: 1px 1px 5px greenyellow;
  }

  to {
      opacity: 0.3;
      box-shadow: none;
  }
}

@keyframes box2 {
  from {
      opacity: 0.3;
      box-shadow: none;
  }

  to {
      opacity: 1;
      box-shadow: 1px 1px 5px yellow;
  }
}