chrome中子菜单的位置不起作用. [英] Position of submenu in chrome is not working.
本文介绍了chrome中子菜单的位置不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在尝试使用jquery在asp.net中正确放置一个子菜单.它在IE中效果很好,但在chrome中效果不佳:
这是我的代码:
Hi all ,
I am trying to place a submenu correctly in asp.net using jquery.It is working great in IE but not in chrome :
Here is my code:
<script type="text/javascript">
var p = $("#b");
var pos = p.position();
var sub = document.getElementById("men");
sub.top = pos.top + 70;
sub.left = pos.left;
$("#men").offset({ left: sub.left, top: sub.top });
</script>
Please somebody tell me how to place it correctly in chrome.
推荐答案
(#b"); var pos = p.position(); var sub = document.getElementById("men"); sub.top =最高排名+ 70; sub.left = pos.left;
("#b"); var pos = p.position(); var sub = document.getElementById("men"); sub.top = pos.top + 70; sub.left = pos.left;
(#men").offset({left:sub.left,top:sub.top}); < /script >
("#men").offset({ left: sub.left, top: sub.top }); </script>
请有人告诉我如何正确地将其放置在chrome中.
Please somebody tell me how to place it correctly in chrome.
对于所有有此问题的人.我使用:
解决了
For all people having this problem.I solved it using :
这篇关于chrome中子菜单的位置不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文