I have my jsfiddle here.
I basically want the hidden div to slide open when about is hovered over with a mouse. It's going to be a part of a navigation bar and the description of the page will slow below.
I've tried using
-webkit-transition: all 0.5s ease-in-out;
to no avail. Here is my code:
.aboutnav {
background-color: #a661ca;
}
.aboutcontents {
display: none;
}
.aboutnav:hover .aboutcontents {
display: block;
background-color: #a661ca;
}
LIVE DEMO
You can't add a transition for display. You'll want to consider hiding and showing the content by other means, such as
max-height
andopacity
. You'll want to set the non-zeromax-height
value to be something large, so you don't accidentally clip your content.Demo
You should change the margin-top of
.aboutcontents
to make it slide. As a default.aboutcontents
is hidden behind.aboutnav
, hovering on.aboutnav
,.aboutcontents
slides down.Here's a demo