guchengf
2013-09-02 16:23:59 +08:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="a.css">
</head>
<body>
<div>
<ul id="a">111
<li>aaa</li>
<li>bbb</li>
<li>ccc</li>
</ul>
</div>
</body>
</html>
#a li{
list-style: none;
background: black;
color: white;
height: 0px;
-moz-transition: height 2s ease;
-webkit-transition: height 2s ease;
-o-transition: height 2s ease;
transition: height 2s ease;
}
#a:hover li{
height: 20px;
}
上面是HTML,下面是CSS,你看是不是你要的效果