首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

做下拉菜单 出现了有关问题

2013-08-10 
做下拉菜单 出现了问题代码贴上:%@ Page LanguageC# AutoEventWireuptrueCodeFileDefault.aspx.c

做下拉菜单 出现了问题
代码贴上:
<%@ 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” 的左面也有一块背景颜色
知道的告诉下   多谢
------解决方案--------------------


ul, li {
    background-color: Gray;
    height: 20px;
    list-style: none outside none;
    padding-left: 0;
    width: 50px;
}

你指的是这个么?

热点排行