我将图像用作下拉列表项,发现每个元素之间都有不必要的空白,因此想知道是否可以删除所有空白
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="demo.css">
</head>
<body>
<div id='wrap'>
<div id="clickable_div">MENU</div>
<div id="nav_menu">
<ul class="dropDown">
<li><img src="ori_12.png"></li>
<li><img src="ori_12.png"></li>
<li><img src="ori_12.png"></li>
<li><img src="ori_12.png"></li>
</ul>
</div>
</div>
</div>
</body>
<script>
$('#wrap').mouseover( function(){
$('#nav_menu').slideDown();
})
$('#wrap').mouseleave( function(){
$('#nav_menu').slideUp();
});
</script>
</html>
下面是我的Demo.css:
#clickable_div {width:166px; background-color:#9c9c9c;}
*{margin:0; padding:0}
#nav_menu{width:166px; height:auto; background-color:#CCC;display:none;}
#wrap{ width:166px }