我在下拉菜单中使用 jquery-masonry 时遇到问题
我想在下拉菜单中使用 jquery masonry,在复杂的下拉菜单中组织动态菜单项块(图像和文本)。
我有几个问题。
首先,如果我从 display:none 开始,那么 masonry 不会进行任何位置计算。由于我使用带有下拉菜单的砌体,因此我无法打开下拉菜单可见的页面。
其次,菜单容器必须是位置:绝对的,以便下拉菜单在连续页面上打开,并且不会下推菜单下方的文本。 Masonry 将页面的其余部分向下推。
第三,使用 IE 8 和 9(尚未尝试 7),当我隐藏和显示下拉列表时,项目块开始时是无组织的,然后立即切换到有组织的砖石布局。这是我不明白也无法摆脱的每一个隐藏和展示上的闪光。
有人在下拉菜单中成功使用过 jquery masonry 吗?
谢谢
I'd like to use jquery masonry within a drop down menu, to organize the dynamic menu item blocks (images and text) in a complex drop down menu.
I'm having a couple of issues.
First of all, if I start with display:none then masonry doesn't do any position calculations. Since I'm using masonry with a drop down menu, I can't open the page with the drop down visible.
Secondly, the menu container has to be position:absolute so that the drop down opens Over the continuing page and doesn't push down the text below the menu. Masonry pushes the rest of the page down.
Thirdly, with IE 8 and 9 (didn't try 7 yet), when the I hide and show the dropdown, the blocks of items start off unorganized and then instantly switch to the organized masonry layout. It's the flash on every hide and show that I don't understand and can't get rid of.
Has anyone successfully used jquery masonry within a dropdown menu?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据第一个问题,只需使用
visibility:hidden
并在悬停事件中visibility:visible
而不是display:none
&显示:块
。According to the first issue, just use
visibility:hidden
and in hover eventvisibility: visible
instead ofdisplay:none
&display:block
.