我有一个div,当用户将鼠标悬停在链接上时,使用jquery下拉菜单。该div的CSS是在这里:在铬中的位置问题
.mask-layer {
height: 0;
overflow: visible;
position: relative;
top: 54px;
float: right;
z-index: 1000;
}
.slidedown {
height: auto;
width: 300px;
background: url(../images/bg_shopping_bag_span.png); background-repeat:repeat-y;
color: white;
}
Html只是在蒙版图层div内滑动div。出于某种原因,我无法在此发布任何尖括号以向您展示。
最后jQuery的:
jQuery(document).ready(function() {
jQuery('.slidedown').hide();
jQuery('a.top-link-cart').hover(function() {
jQuery('.slidedown').stop(true, true).animate({
height: ['toggle', 'swing'],
}, 600, function() {});
}, function() {
jQuery('.slidedown').mouseout(function() {
setTimeout(function() {
jQuery('.slidedown').stop(true, true).animate({
height: '0px'
}, 600, function() {});
}, 200);
});
});
});
下拉在Internet Explorer和Firefox效果很好。但是,在Chrome中,下滑div出现在页面上的错误位置。它出现在屏幕边缘的所有其他div上。有没有办法来解决这个问题?我应该提及,当我禁用jquery,以便div不隐藏并且不动画时,即使在chrome中它也处于正确的位置。所以也许这是jQuery的问题?感谢您的任何建议。
如何重现bug的链接?一个活页面或类似http://jsfiddle.net会很有帮助。 – 2011-01-14 16:39:52