CSS Transitions is a great tool, but it's not easy to achieve its flexibility.
For example, there is an HTML element with a default transparency value equal to one.
Assigning transition-property: opacity and transition-duration: .5s to it
But what if you need to instantly hide an element, and then smoothly show it?
.elem { width:200px; height:100px; background:#333; transition:opacity .5s; } .elem:hover { opacity:0; } <div id="elem" class="elem"></div>