basically I am trying to build a section, that it will have 3 different parts, and they will be loading one after the other after some seconds, and an animation for the loading will be running at the same time.
Here is the picture to make it more clear.
As the line will be loading (increasing width) below the menu items, the text below the line will change too for each menu item.
I am not sure how to implement it. Should I use css keyframes for the animation of the line and then fade-in / out the text based on some delay?
Do I have to use javascript or it can be made with clear css?
Just to be clear here is a very old demo of mine that shows some tab content.
(That’s an old demo and I’d do it differently today but the concept is the same. )
Is that the basis of what you are after?
I’m still not sure what you mean about animation on load or whether you want a continuous slideshow effect etc but maybe the demo will help clarify what you need.
Sorry if I hijack the thread but how would you do it differently today? Is there an approach which gets closer to the functionality of your checkbox version, which I know is not semantically correct but I like the cleanliness of it and have used something similar several times in the past.
I was mainly talking about the use of floats and the prefixes etc.
I’d use grid or flex for the tab selection rather than floats.
I’d also look at some way of adding keyboard navigation into it. Checkboxes/radios can be tabbed but only if the user knows they are input elements as you need the arrow keys (and/or spacebar) to navigate radio groups rather than the tab key.