4
I would like to make an effect that when the user hovers over the frame the background would turn white, coming from left to right first, and once that effect was complete the text would also appear from left to right. I tried to do this, but to no avail.
.overlay-hover {width: 300px}
.overlay-hover {cursor: pointer;position: relative;}
.title-transition {background-color: #fff;width: 100%;height: 100%;position: absolute;top: 0;right: 0;transition: all 500ms 500ms;}
.overlay {background-color: #fff;width: 0;height: 100%;transition: all 500ms;}
.overlay-hover:hover .overlay {width: 100%;}
.overlay-hover:hover .title-transition {width: 0%;}
<div class="overlay-hover">
<span style="width: 100%;height: 200px;background-image: url('https://picsum.photos/200');background-size:cover;backgound-position:center;display: block;">
<div class="overlay">
<h3>Lorem ipsum</h3>
<div class="title-transition"></div>
</div>
</span>
</div>
EDITE
The effect should happen in 3 steps:
1: The block should appear in this format:
2: After the user passes the mouse the first effect appears:
2.1: Running the first effect:
2.2: End of first effect:
3: The second effect shall arise after the first is complete:
3.1 Implementation of the second effect:
3.2: Second full effect:
Search for Translate, keyfames and delay in css, will help you a lot in future animations in css.
– Bruno Romualdo