I have got a problem with a CSS3 animation.
.child {
opacity: 0;
display: none;
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out;
}
.parent:hover .child {
opacity: 0.9;
display: block;
}
This code only works if I remove the change of display
.
I want to change the display just after the hover but the opacity should be changed using the transition.
You can do with CSS animations:
HOW TO ANIMATE OPACITY WITH CSS:
this is my code:
the CSS code
or check this demo file
To have animation on both ways onHoverIn/Out I did this solution. Hope it will help to someone