IE8 li 菜单在鼠标悬停时跳转

发布于 2024-10-08 16:57:12 字数 781 浏览 0 评论 0原文

我只在 IE8 中遇到一个菜单大问题 - 所有其他浏览器都工作完美:

有一个像这样的菜单:

<ul>  
<li><a href="link.html">Point 1</a></li>  
<li><a href="link2.html">Point 2</a></li> 
</ul>

CSS 就是这个:

ul li { padding-left: 23px; line-height: 29px; }

ul li:hover, 
ul li.active { background: url(../images/bg_arrow_blue.png) no-repeat top left; }

ul li a { font-size: 18px; color: #FFFFFF; text-decoration: none; margin-bottom: 5px; letter-spacing: -0.03em; }

ul li a:hover, 
ul li a.active { border-bottom: 1px solid red; }

所以现在 - 在 IE 8 中我遇到了问题,鼠标悬停时链接会跳起来鼠标移开时向下,我认为是由于边框底部。所有其他浏览器都可以正确处理边框底部并且没有跳转。

我用谷歌搜索了很多,但没有找到解决方案。

希望这里的任何人都可以提供帮助!

太感谢了。

萨沙

i have a big problem with a menue ONLY in IE8 - all other browsers work perfect:

There's an menue like this one:

<ul>  
<li><a href="link.html">Point 1</a></li>  
<li><a href="link2.html">Point 2</a></li> 
</ul>

and the CSS is this one:

ul li { padding-left: 23px; line-height: 29px; }

ul li:hover, 
ul li.active { background: url(../images/bg_arrow_blue.png) no-repeat top left; }

ul li a { font-size: 18px; color: #FFFFFF; text-decoration: none; margin-bottom: 5px; letter-spacing: -0.03em; }

ul li a:hover, 
ul li a.active { border-bottom: 1px solid red; }

So now - in IE 8 i have the problem, that on mouseover the links jumps up and down on mouseout, because of the border-bottom i think. All other browsers do it right with border bottom and no jump.

I have googled a lot and not found a solution.

Hope anyone here can help!

Thank you so much.

Sascha

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清音悠歌 2024-10-15 16:57:12

好吧,

对于任何感兴趣的人 - 我有解决方案:

ul li a { font-size: 18px; color: #FFFFFF; text-decoration: none; margin-bottom: 5px; letter-spacing: -0.03em; padding-bottom: 1px; }

我只需添加一个“padding-bottom:1px;”到“ul li a”声明。

祝你圣诞节愉快。

Okay,

for anyone who's interested - i have the solution:

ul li a { font-size: 18px; color: #FFFFFF; text-decoration: none; margin-bottom: 5px; letter-spacing: -0.03em; padding-bottom: 1px; }

i just had to add a "padding-bottom: 1px;" to the "ul li a" statement.

Have a nice christmas.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文