gpt4 book ai didi

html - CSS 菜单不适用于 Internet Explorer 11

转载 作者:行者123 更新时间:2023-11-28 17:06:02 25 4
gpt4 key购买 nike

我在互联网上找到了这个用于水平下拉菜单的 CSS 代码,起初看起来非常好(在 chrome 上的结果是完美的)。但是,当我尝试使用 Internet Explorer 时,下拉元素之间出现空白,我无法浏览菜单。

有什么想法吗?非常感谢您的帮助。

HTML:

<div id="menu">

<ul>
<li><a href="accueil.htm">Accueil</a></li>
<li><a href="cv/Cvfrdept.pdf">CV</a></li>
<li><a href="accueil.htm">Enseignement</a>
<ul>
<li><a href="plans.htm">Plans de cours</a></li>
<li><a href="lecons.htm">Leçons</a></li>
<li><a href="ppt.htm">Powerpoints </a></li>
</ul>
</li>
<li><a href="recherche.htm">Recherche</a>
<ul>
<li><a href="italia.htm">Italia</a></li>
<li><a href="livres.htm">Livres</a></li>
</ul>
</li>
<li><a href="liens.htm">Liens</a></li>
<li><a href="contact.htm">Contact</a></li>
<li><a href="home.htm">English</a></li>
</ul>

</div>

还有 CSS:

ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;
}

ul a:hover {
color: #ffffff;
}

ul li {
display: block;
position: relative;
float: left;
}

li ul {
display: none;
}

ul li a {
display: block;
text-decoration: none;
color: #ffffff;
border-top: 0px solid #ffffff;
padding: 5px 15px 5px 15px;
background: #2C5463;
margin-left: 0px;
white-space: nowrap;
}
ul li a:hover {
background: #617F8A;
}

li:hover ul {
display: block;
position: absolute;
}

li:hover li {
float: none;
font-size: 11px;
}

li:hover a {
background: #617F8A;
}

li:hover li a:hover {
background: #95A9B1;
}

最佳答案

您是否缺少示例中的某些代码,或者这是确切的代码,因为我认为您缺少关闭

</ul>

?

关于html - CSS 菜单不适用于 Internet Explorer 11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30337699/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com