本文介绍了jQuery UI手风琴问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery UI手风琴小部件,并且在每个项目之间我都有一些空间。问题是,在IE 8 中,当您滑动项目时,它会很好地滑动,但它会移除它与向上项目之间的空间。但它在FF和其他浏览器中运行良好。

I use the jQuery UI accordion widget, and between every item I have some space. The issue is that in IE 8 , when you slide an item, it slides fine, but it removes the space between it and the upward item. It works good in FF and other browsers, though. alt text http://img208.imageshack.us/img208/5074/along.jpg

但是,当我在该项目上使用鼠标时,它会创建该空间。

When I over with the mouse on that item, though, it creates that space.

我使用的是HTML5 doctype,但它也不适用于其他doctypes。

I use the HTML5 doctype, but it doesn't work with others doctypes either.

谢谢。

编辑:这是。

推荐答案

尝试将 margin-bottom:5px; 应用于 .ui -accordion-header

这将导致打开标题与其内容之间存在差距,但您可以通过删除边距来解决此问题 .ui-accordion-header.ui-state-active 并将其应用于 .ui-accordion-content-active 相反。

This will cause a gap between the open header and it's content, but you can fix that by removing the margin on .ui-accordion-header.ui-state-active and applying it to .ui-accordion-content-active instead.

所以你的css看起来像这样:

So your css would look like this:


.ui-accordion-header {

margin-bottom:5px;

}

.ui-accordion-header.ui-state-active {

margin-bottom: 0;

}

.ui- accordion-content-active {

margin-bottom:5px;

}

这可能需要一些调整,但应该让你大部分在那里。

That might need a bit of tweaking, but should get you mostly there.

这篇关于jQuery UI手风琴问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 10:31