image animation with keyframe and 4 images?

I created an animation with four images that I positioned absolutely and stacked with a z-index. The transition works perfectly. However, I now have the problem that the parent element has a height of 0 due to the absolute positioning, and I then have content that slips behind the images due to the 0 height. I could give the parent element a fixed height, but that would make the whole thing no longer fluidly responsive.
what can you do?

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Destranix
1 year ago

Then do not use absolute positioning. You don’t need that, and that doesn’t make stuff responsive.

If you need the absolute posotion due, then separate your code into an absolute part and a relative part.
Like the overlay of the tree here, for example: https://destra.uber.space/art