我创建了一个下拉菜单,它在Firefox和Chrome中完美运行,但在IE中则无法运行。 IE中的一切看起来都不错,除非我将鼠标放在“服务”选项卡上,子菜单不会下拉。我在下面列出了编码,非常感谢任何帮助。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>menubar</title>
<style type="text/css">
#div1 {
background-color: #000;
margin: 17px;
width: 801px;
}
#div1 ul {
margin: 0px;
padding: 0px;
list-style-type: none;
}
#div1 ul li {
float: left;
position: relative;
}
#div1 ul li a {
line-height: 30px;
text-decoration: none;
background-color: #999999;
display: block;
height: 30px;
width: 155px;
color: #000;
text-align: center;
}
#div1 ul li a {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #000;
border-right-color: #555;
border-bottom-color: #555;
border-left-color: #000;
}
#div1 ul li :hover {
background-color: #CCC;
}
#div1 ul li ul {
position: absolute;
top: 31px;
visibility: hidden;
}
#div1 ul li:hover ul {
visibility: visible;
}
#div1 ul li ul li a {
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #000;
border-bottom-color: #555;
}
#div1 ul li ul li a {
height: 30px;
width: 160px;
}
#div1 ul li ul li a {
background-color: #CCC;
}
#div1 ul li a {
font-size: 16px;
background-color: #999;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
}
#div1 ul li ul li a {
background-color: #999;
}
</style>
</head>
<body>
<div id="div1">
<ul>
<li><a href="www.leads2rev.com">Home </a>
</li>
</ul>
<ul>
<li><a href="www.leads2rev.com">Services </a>
<ul>
<li><a href="www.leads2rev.com">Surveillance </a>
<li><a href="www.leads2rev.com">Background Check </a>
<li><a href="www.leads2rev.com">Location/Skiptrace </a>
<li><a href="www.leads2rev.com">Activity Check </a>
<li><a href="www.leads2rev.com">Special Investigations </a>
<li><a href="www.leads2rev.com">Medical Investigation </a>
</li>
</ul>
</li>
</ul>
<ul>
<li><a href="www.leads2rev.com">Assign A Case </a>
</li>
</ul>
<ul>
<li><a href="www.leads2rev.com">Contact Us </a>
</li>
</ul>
<ul>
<li><a href="www.leads2rev.com">Careers </a>
</li>
</ul>
</div>
</body>
</html>