Opacity vs visibility

What is that case when these options need to be apply in one element? As i see those two use in one time not works well with transition. When set for example 1s the time then the visibility comes before end so that is not smooth?

When good to use opacity vs visibility?

Or both one time?


You cannot transition visibility. It’s either “visible” or “hidden”., either ON screen, or OFF.

You can transition opacity, go from 0.0 to 1.0, or reverse, so the element slowly fades in or out into view.