Html
    Css
    Js

    
                        
.nav {
	list-style:none;
}
.nav li {
	float:left;
	height:50px;
	width:100px;
	border:1px solid #EEEEEE;
	background:wheat;
	text-align:center;
	line-height:50px;
	position:relative;
	cursor:pointer;
	overflow:hidden;
}
.nav li>div {
	transition:all .3s;
	-moz-transition:all .3s;
	-ms-transition:all .3s;
	-webkit-transition:all .3s;
}
.nav li>div:first-child {
	position:absolute;
	bottom:0;
	left:0;
	right:0;
	background:aqua;
}
.nav li>div:last-child {
	position:absolute;
	bottom:-52px;
	left:0;
	right:0;
	background:red;
}
.nav li:hover>div:last-child {
	bottom:0;
}
.nav li:hover>div:first-child {
	bottom:52px;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

纯css导航动画

0