User:Choocolatiah/common.css

.my_div { transition: all 500ms ease-in-out; } /* .my_div, .my_div:hover { background-color: #f9e9ef; color: #282828; } .old-text, .new-text { display: block; overflow: hidden; transition: all 500ms ease-in-out; } .old-text { height: auto; opacity: 1; width: auto; } .new-text { height: 0; opacity: 0; width: 0; } .my_div:hover .old-text { height: 0px; opacity: 0; width: 0px; } .my_div:hover .new-text { height: auto; opacity: 1; width: auto; }