0

Why does this not transition while the height does change.

<div class="text-container">
    <div class="heading"><p>Foo</p></div>    
    <div class="story"><p>BAR BAR BAR BAR BAR BAR BAR </p></div>  
</div>   

and the css:

.text-container {
    position: relative;
    overflow: hidden;
    margin: 10px;
    margin-right: 0;
    max-width: 300px;
    background: red;
    transition: all 0.2s cubic-bezier(0.320, 0.715, 0.470, 0.830);
}

.story {
    display: none;
}

.text-container:hover .story {
    display: initial;
}

fiddle:

https://jsfiddle.net/clankill3r/k00nhsbb/

clankill3r
  • 9,146
  • 20
  • 70
  • 126

0 Answers0