Html
    Css
    Js


 .parent {
	display:flex;
	flex-direction:row;
	flex-wrap:nowrap;
	position:relative;
}
.children {
	width:25%;
	text-align:center;
	cursor:pointer;
	height:50px;
}
#tips {
	position:absolute;
	bottom:0;
	height:3px;
	width:20px;
	background-color:red;
	-webkit-transition:left 500ms;
	-moz-transition:left 500ms;
	-ms-transition:left 500ms;
	-o-transition:left 500ms;
	transition:left 500ms;
}

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

导航栏的滑动画跟随

0