I wrote a code for my header, when you hover the header, it resizes its width to 300px and now I would like to add text inside only when width = 300px or slowly add the text while resizing the header after hovering it with mouse.
This is the code I wrote. CSS:
#header {width: 5px; height: calc(100vh - 30px); text-align: center; transition: width 0.5s ease-out; -o-transition: width 0.5s ease-out; -ms-transition: width 0.5s ease-out; -moz-transition: width 0.5s ease-out; -webkit-transition: width 0.5s ease-out;}
#header:hover {width: 300px; background: #171C21;}
HTML:
<div id="header">
<p>test</p>
<p>test</p>
<p>test</p>
</div>
I'm looking for a CSS method if there is any method to make this in CSS.
Live preview: http://awesomeness.adam.zur.io/
overflow: hidden;? - Roope