I want to change the z-index of a div by clicking it, only with CSS3. I'm being able to achieve it with my code in all browsers except safari. I've already tried it with :target transition and :target animation (using animation-fill-mode: forwards) and both do not work.
Here is my code (simplified):
#flap1 {
z-index: 30;
}
#flap1:target {
transition: all 1s ease-in-out;
z-index: 1;
}
How do I maintain the z-index in the final value (=1) ? While the animation is going on, the z-index do change it's value.