Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
}
ul,li {
	list-style:none;
}
a {
	text-decoration:none;
	color:#000;
}
ul.box > li.user {
	width:100px;
	height:40px;
}
ul.box > li.user > a {
	width:100%;
	height:100%;
	display:block;
	background:#ccc;
	display:flex;
	justify-content:center;
	align-items:center;
}
ul.box > li.user:hover .down-menu {
	display:block;
}
ul.box > li > .down-menu {
	background:#fb3;
	width:100px;
	display:none;
}
ul.box > li > .down-menu > li {
	display:flex;
	justify-content:center;
	align-items:center;
	height:30px;
	border-bottom:1px solid #fff;
	cursor:pointer;
}

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

css下拉菜单

更新时间:2020-08-29 23:01:30

0