读书人

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

发布时间: 2013-08-10 21:14:06 作者: rapoo

做下拉菜单 出现了问题
代码贴上:
<%@ 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;
}

你指的是这个么?

读书人网 >CSS

热点推荐