当嵌入父容器时,jQueryUI手风琴在IE7中被破坏,溢出:自动设置

时间:2013-01-17 22:14:46

标签: internet-explorer-7 jquery-ui-accordion css

任何父容器div上设置overflow:auto;时,JQuery UI Accordion窗口小部件不适用于IE7中较长的可滚动内容。我尝试将Accordion的最里面的子div设置为overflow:visible !important;,但它不起作用。适用于IE8,IE9,IE9兼容模式,Chrome,FF,Opera和Safari。

IE7中的

Test this fiddle。一定要明确设置IE使用“浏览器模式:IE7”和“文档模式:IE7标准”。

如何解决?

<div style="overflow:auto;">
  <div id="accordion" style="overflow:visible;float:right;height:400px;width:500px;border:2px solid red;float:right;">
    <h3>Section 1</h3>
    <div>
      <script type="text/javascript">
        for (var i=0; i<10; i++)
        {
        document.write("<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>");
        document.write("<ul>");
        document.write("<li>List item one</li>");
        document.write("<li>List item two</li>");
        document.write("<li>List item three</li>");
        document.write("</ul>");
        }
      </script>
        </div>
        <h3>Section 2</h3>
        <div>
          <p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
        </div>
      </div>
</div>

1 个答案:

答案 0 :(得分:1)

所以事实证明这是当前版本的jqueryui手风琴中的一个错误。
请参阅jqueryui bug report here