简体   繁体   English

导航菜单-悬停背景表现异常

[英]Navigation menu - background on hover behave strangely

I have a problem with a navigation menu for which I have applied pie.js (library that allows you to have css3 on ie6-8 browsers). 我对应用了pie.js(允许您在ie6-8浏览器上使用css3的库)的导航菜单有问题。 Works well at first sight but if we will play a little bit with the menu, wrong behavior will raise:(. To receive that strange behavior you must move cursor a little faster left and right over the drop-down menu on IE8. This is a function through I call js library. 乍一看效果很好,但是如果我们稍稍玩一下菜单,就会出现错误的行为:(。要接收这种奇怪的行为,您必须在IE8的下拉菜单上向左和向右移动光标一点。这是通过我调用js库的功能。

$(document).ready(function(){
    if (window.PIE) {
        $('.aahov,ul#menu,ul#menu li ul').each(function(){
            PIE.attach(this);
        });
    }

}); });

Check this example: http://mainpage.ueuo.com 检查以下示例: http : //mainpage.ueuo.com

...and don't forget, only on IE8 browsers ... ...而且别忘了,仅在IE8浏览器上...

Thank's. 谢谢。

It might just be IE8 adding some extra padding. 可能只是IE8添加了一些额外的填充。

I noticed from your css that you aren't using a css reset which may help to eliminate browser based differences. 我从您的CSS注意到,您没有使用CSS重置,这可能有助于消除基于浏览器的差异。

You could have a look at http://meyerweb.com/eric/tools/css/reset/ or something similar. 您可以查看http://meyerweb.com/eric/tools/css/reset/或类似的内容。

Also IE8 doesn't support last-child IE8也不支持最后一个孩子

ul#menu li ul li:last-child{ border-bottom:none; ul#menu li ul li:last-child {border-bottom:none; } }

So this will also affect the look of your menu items. 因此,这也会影响菜单项的外观。

Also as a side note from a usability point of view it would be good practice to let the user know that the menu link is a drop down. 同样从可用性的角度来看,最好的做法是让用户知道菜单链接是一个下拉菜单。 Possibly add a down arrow to the right of the link. 可能在链接的右侧添加一个向下箭头。

Your scripting looks good to me, it looks like it's something in your styling. 您的脚本对我来说看起来不错,看起来就像您的样式中一样。 Not really sure what you have there, but you might be able to work it around to use overflow:hidden , or at least that might be a place to start. 不太确定那里有什么,但是您可以解决该问题以使用overflow:hidden ,或者至少可以从这里开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM