知识点:css js jquery等
css代码
<!-- 禁掉浏览器边框 -->
body{margin:0;padding:0;}
.div{width:150px;position:relative;}
.border{position:relative;border:1px solid lightgrey;width:150px;height:30px;text-align: center;line-height:30px;font-size:18px;display:block;}
.div ul{position:absolute;list-style-type:none;margin:0;padding-left:0;width:150px;display:none;overflow:hidden;z-index:999;border:1px solid grey;}
.div ul li{width:100%;text-align:center;padding-left:0;height:30px;line-height:30px;overflow:hidden;background:lightgrey;}
/*.spot:hover,.hotel:hover,.travel:hover{background:green;}*/
ul li:hover{background:green;}
js代码
<script>
$(function(){
$(".div").hover(function(){
if($("ul").css("display")=='none'){
$("ul").fadeIn("100");