I am facing an issue with my code where the background image of the site transitions between 5 different images, but every time an animation completes and the next one starts, there's a white flash. I'm not sure how to resolve it or what I might have done wrong. Can someone help me troubleshoot this problem?
@keyframes backswitch {
0% {
background-image: url("background.jpg");
}
20% {
background-image: url("background_2.jpg");
}
40% {
background-image: url("background_3.jpg");
}
60% {
background-image: url("background_4.jpg");
}
80% {
background-image: url("background_5.jpg");
}
100% {
background-image: url("background_6.jpg");
}
}
body {
/*Adjusting images and animation*/
background-repeat: no-repeat;
max-width: 100%;
max-height: 100%;
background-size: cover;
animation-name: backswitch;
animation-duration: 60s;
animation-iteration-count: infinite;
}
<!DOCTYPE html>
<html>
<body>
</body>
</html>