日期:2014-05-16  浏览次数:20678 次

做下拉菜单 出现了问题
代码贴上:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
 
  ul,li
  {
         list-style:none;
        width: 50px;
        height: 20px;
        
        background-color:Gray;
        
    }
  ul
  {
      margin-left:50px;
        margin-top:50px;
      }
</style>
<script language="javascript";>
    function mouseover() {
        pp.style.display = "block";
        
    }
    function mouseout() {
        pp.style.display = "none";
    }

</script>
</head>

<body>
<div>
    <ul onmouseover="mouseover();" onmouseout="mouseout();">
    <a href="#">1</a>
    <div id="pp" style=" display:none;">
    <li id="bb"><a href="#">11</a></li>
    <li id="cc"><a href="#">12</a></li>
    </div>
    </ul>

</div>

</body>




//////////////////////////////////////////////////////////////////////////
实现效果总是不对  
就是“1” 的左面也有一块背景颜色
知道的告诉下   多谢

------解决方案--------------------