HTML
<nav>
<ul class="ul1">
<li>
<a href="">首页</a>
<ul class="ul2">
<li><a href="">新闻</a></li>
<li><a href="">科技</a></li>
<li><a href="">财经</a></li>
<li><a href="">读书</a></li>
</ul>
</li>
</ul>
</nav>
CSS
.ul1{transition: all 1s ease;}
ul{list-style: none;}
a{text-decoration: none;}
.ul1>li{
width: 200px;
height:2em;
background: rgba(30,50,200,0.7);
line-height: 2em;
list-style: none;
text-align: center;
overflow: hidden;}
.ul1>li:hover{
overflow: visible;}
.ul2{
background: rgba(30,50,200,0.4);}
.ul2>li:hover{
background: rgba(200,0,20,1);
width: 100%;
height: 2em;
line-height: 2em;
display: block;}
就是说属性之中可以animation的,没有overflow,因此不能用伪类做overflow的过度