I want to make a simple landscape based on the change of times of day, sunrise, sunset and dusk, in addition to the interval in which it begins to fall in the evening I want to add a small image of a star to get a better visualization of the animation and it is at this point that I have my problem.
Here's my code:
body{
-webkit-animation-name:cambios;
-webkit-animation-duration:15s;
}
.estrella{
background-image: url(estrella.png);
position: relative;
width: 255px;
height: 250px;
animation-name: estrella;
animation-duration: 15s;
animation-delay: 1s;
animation-iteration-count: 1;
top: 700px;
left: 300px;
}
@keyframes cambios{
/*Keyframes para los intervalos de colores*/
0%{
background: yellow;
}
50%{
background: orange;
}
100%{
background: #0404B4;
}
@keyframes estrella{
/*Keyframes para la imagen de la estrella*/
from{
top: 700px;
}
to{
top: 20px;
}
}
<div class="estrella"></div>
I have already placed my star at the bottom of the page and I want it to be hidden by the star as darkness arrives and when it reaches the point of the night that the star begins to appear and is displayed at the top of the page (although I still do not know what property I could use to achieve this effect of appearance), with my code I have not managed to execute the animation I want the star to have, since it remains immobile in its initial position.