I wanted to make an effect with animation or transition of CSS3 that when the red square passes, the background appears (the yellow background with the texts) followed as the red square finished passing.
Below is the most I could do, I could not finish this effect at all. It is possible? Thank you!
I put an effect on the background using the mouse hover event, I want this same effect, but not with the mouse but with the red square passing.
<!doctype html>
<html>
<head>
<style>
#yellow {
background-color: yellow;
}
#shadow {
background-color: black;
width: 100%;
height: 2048px;
position:absolute;
left:1px;
top:1px;
transition: all 3s ease;
}
#shadow:hover {
opacity: 0;
}
#square {
margin-top: 10px;
width: 20px;
height: 20px;
background: red;
position: relative;
-webkit-animation: mymove 10s infinite;
}
@-webkit-keyframes mymove {
from {left: 0px;}
to {left: 600px;}
}
</style>
</head>
<body id="yellow">
<h1>Estou aqui!</h1><br><br>
<h4>Texto teste</h4>
<div id="shadow"></div>
<div id="square"></div>
</body>
</html>