My goal is to incorporate an animation that shifts an image, and as the user scrolls down, the content will hide this image.
If I use an image without any animation like this one, everything functions properly and the content hides the image when the user scrolls down.
header {
height: calc(100vh - 22px);
background-size: cover;
background: url("https://res.cloudinary.com/abdel-rahman-ali/image/upload/v1535988534/header.jpg") fixed bottom;
padding: 20px 70px;
}
However, upon attempting to apply keyframes for the animation and scrolling down, the content fails to hide the image.
@keyframes background {
0% {
background: url(https://res.cloudinary.com/abdel-rahman-ali/image/upload/v1535988534/header.jpg) no-repeat 50% 30%;
background-size: 100%;
transition: background 0.5s ;
}
100% {
background: url(https://res.cloudinary.com/abdel-rahman-ali/image/upload/v1535988534/header.jpg) no-repeat 50% 60%;
background-size: 100%;
transition: background 0.5s ;
}
}