以下是Zurb Accordion Foundation Documentation
如何扭转Zurb手风琴的开启方向?
Here is the demo link - 访问代码 000
我希望手风琴能够向上/向上/向上滑动 - 而不是向下滑动。 纯CSS会很邪恶,但如果J $有效,那也很棒!
:)
感谢您的关注
答案 0 :(得分:1)
我已经根据它定制了。所以它向上......我认为它会帮助你
.accordion .accordion-navigation.active > a, .accordion dd.active > a {
background: #e8e8e8;
position:relative;
top:85px; // Change this
}
.accordion .accordion-navigation > a, .accordion dd > a {
background: #efefef;
color: #222222;
padding: 1rem;
display: block;
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
font-size: 1rem; }
.accordion .accordion-navigation > a:hover, .accordion dd > a:hover {
background: #e3e3e3; }
.accordion .accordion-navigation > .content, .accordion dd > .content {
display: none;
padding: 0.9375rem; }
.accordion .accordion-navigation > .content.active, .accordion dd > .content.active {
display: block;
background: white;
position:relative;
top:-55px; // Change this too
}
你唯一要做的就是......你要定位孩子......
答案 1 :(得分:0)
试试这样:
<强> JS:强>
$(".accordion").on("click", "dd:not(.active)", function (event) {
$("dd.active").removeClass('active').find(".content").slideUp("slow");
$(this).addClass('active').find(".content").slideToggle("slow");
});