ul { list-style:none; width:200px; padding:0; margin:auto; } ul li p { height:0px; transition:height 1s; overflow:hidden; margin:0; background:#43688a } ul li a { display:block; text-align:center; color:white; height:32px } ul li a:hover { color:red } ul li span { background:#2f4050; color:white; display:block; text-align:center; padding:8px 0; position:relative }
通过js技术高度 动态获取高度添加高度