Html
    Css
    Js

    
                        
    * {
	margin:0;
	padding:0;
}
body {
	background-color:#b6b3b3;
}
li {
	list-style:none;
}
.nav {
	width:400px;
	height:60px;
	margin:100px auto;
	border-radius:70px;
	position:relative;
}
.nav img {
	width:100px;
	height:60px;
	border-radius:10px;
	position:absolute;
	left:0;
	top:0;
	z-index:-1;
	transition:all .3s;
}
.nav ul {
	display:flex;
	align-items:center;
}
.nav ul li {
	width:100px;
	height:60px;
	line-height:60px;
	box-sizing:border-box;
	border:1px dashed #555;
	border-radius:10px;
	text-align:center;
	color:#fff;
	cursor:pointer;
}

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

jQuery筋斗云导航代码(原创)

更新时间:2022-06-16 01:24:37

点击某个元素获取当前点击的距左距离赋值给筋斗云

0