- Unfortunately I can not comment for lack of reputation, so I'll pose a new question based on another question *
This question was answered perfectly: css3 transition animation on load?
What I would like to know is how to make the header "push" a following div as it transitions instead of automatically taking up the space. I've added a delay necessary for my needs.
CSS:
header {
background: #3d3d3d;
color: #fff;
min-height: 0;
max-height:auto;
position: relative;
padding: 30px;
-moz-animation-name: dropSection;
-moz-animation-iteration-count: 1;
-moz-animation-timing-function: ease-out;
-moz-animation-duration: 1.6s;
-moz-animation-delay: 2s;
-webkit-animation-name: dropSection;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: ease-out;
-webkit-animation-duration: 1.6s;
-webkit-animation-delay: 2s;
animation-name: dropSection;
animation-iteration-count: 1;
animation-timing-function: ease-out;
animation-duration: 1.6s;
animation-delay: 2s;
}
.panel-content{
}
@-moz-keyframes dropSection {
0% {
-moz-transform: translateY(-100%);
}
100% {
-moz-transform: translateY(0);
}
}
@-webkit-keyframes dropSection {
0% {
-webkit-transform: translateY(-100%);
}
100% {
-webkit-transform: translateY(0);
}
}
@keyframes dropSection {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
HTML:
<header>
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec sed odio dui. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Sed posuere consectetur est at lobortis.</p>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec sed odio dui. Sed posuere consectetur est at lobortis. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
</header>
<div class="panel-content">
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec sed odio dui. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Sed posuere consectetur est at lobortis.</p>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean lacinia bibendum nulla sed consectetur. Aenean lacinia bibendum nulla sed consectetur. Donec sed odio dui. Sed posuere consectetur est at lobortis. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
</div>
Basically, the div with the page content should be at the top, then pushed down to make space for the header when it animates in. I'm sure it's simple, I just can't seem to nail it down.
Always appreciated!