1

在以下链接中:

关联

每当用户访问时,在 IE 或 FF 中,菜单首先显示为展开几秒钟然后折叠。谁能告诉我我必须在哪里编辑以确保它不会在页面加载时扩展。只发生在某些页面上。

编辑:我做了以下,现在很好。

#topMainNav .dropdown {
    position: absolute;
    padding: 5px; /* padding: 5px 10px 5px 10px; */
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    -moz-border-radius-bottomright: 10px;
    -moz-border-radius-bottomleft: 10px;
    z-index: 1;
    display: none; /* <<-- **ADDED THIS AND IT SOLVED THE PROBLEM** */
}
4

2 回答 2

1

无法重现行为,但你可以试试这个:

        <head>
           {....}
           <style id="substyle">.dropdown{display:none !important}</style>
        </head>

然后最好使用 onload 而不是 jquery 就绪事件回调函数:(因为之后触发)

window.onload = function() {$('#substyle').remove();}
于 2012-10-18T17:14:36.727 回答
1

尝试

<div class="expand" style="display: none">
于 2012-10-18T17:06:05.663 回答