偏移到Safari中的下拉菜单

时间:2021-12-03 19:10:01

I am using bootstrap to develop a responsive website. I have tested it in Firefox, Chrome and IE where everything seems to be working, but the dropdown menu (in main menu) adds a offset to it self in Safari.

我正在使用bootstrap开发一个响应式网站。我已经在Firefox,Chrome和IE中对它进行了测试,其中一切似乎都有效,但是下拉菜单(在主菜单中)在Safari中为它自己添加了一个偏移量。

I checked the Safari inspector to see what went wrong, but the inspector seems to think that the dropdown menu is displayed correctly - even though it is not.

我检查了Safari检查器,看看出了什么问题,但检查员似乎认为下拉菜单显示正确 - 即使它不是。

See http://birdatwork.com/*/safari-bug.html for an example of what I am talking about.

有关我所说的内容的示例,请参见http://birdatwork.com/*/safari-bug.html。

The site can be seen at http://kik.vejnoe.orvad.net/en. Hope you can help find out why it happens.

该网站可以在http://kik.vejnoe.orvad.net/en上看到。希望你能帮助找出它发生的原因。

1 个解决方案

#1


0  

I have not found out why it happens, but I have found a solution. The solution is that I wrote some JavaScript that listens for clicks on menues and window resize events (only in Safari). Whenever one of these events happens the code will position the menu to the left by using the jQuery offset function.

我还没有发现它为什么会发生,但我找到了解决方案。解决方案是我编写了一些JavaScript来监听menues和window resize事件的点击(仅限Safari)。每当其中一个事件发生时,代码将使用jQuery偏移函数将菜单置于左侧。

#1


0  

I have not found out why it happens, but I have found a solution. The solution is that I wrote some JavaScript that listens for clicks on menues and window resize events (only in Safari). Whenever one of these events happens the code will position the menu to the left by using the jQuery offset function.

我还没有发现它为什么会发生,但我找到了解决方案。解决方案是我编写了一些JavaScript来监听menues和window resize事件的点击(仅限Safari)。每当其中一个事件发生时,代码将使用jQuery偏移函数将菜单置于左侧。

相关文章