我已经看过其他问题,但我没有找到我需要的答案。手风琴编码箭头展开
我的老板走了出去,让我几乎成为这里唯一的人,而我陷入了跳跃到只有最基本的html体验的响应式网站设计。所以我真的需要它一步一步地为我阐明。
我希望能够添加一个箭头,当一个项目被关闭时,它被打开时指向右侧。
我有我的箭头创建。他们被称为right.png和down.png
请注意:如果你通过这个,并认为有对我来说,这样做,那么我就干脆干掉他的代码,并与东西取代它的简单方法你有这个作品。我现在很迷茫,我的副总裁想让我完成这件事。请帮忙!
他怎么设置它:
这是手风琴代码,以前的人开始使用。它有效,但他没有在其中包含箭头。
脚本
$(function() {
$("#gallery").accordion({
heightStyle: 'content',
collapsible: true,
autoHeight: false});
});
/脚本
这是一个可扩展的第一个元素。请注意,他有第一个默认为当用户来到页面时打开....
div id =“gallery”(我不得不删除<>使其显示它是在膨胀部的列表顶部)
<h3 class="gallery">Associate of Arts in Liberal Arts</h3>
<div class="photobox"><img class="image-left" src="images/aala.jpg" width="302" height="200" alt="" />
<p>Centenary's accelerated 64-credit hour AALA business program lets you complete your Associate of Arts degree in either in-class or online. This program focuses on business, leadership, teamwork, and communication. We provide students with the skills needed to start careers in a competitive and fast-moving economy. Our program focuses on leadership, teamwork, and communication. These skills build your personal growth, service to the community, and career advancement. Enhance your employment opportunities or transfer your credits to earn your Bachelor's degree. </p>
</div>
这是这个扩展一个默认为被关闭时,用户来到页第二元件。
<h3 class="gallery">Bachelor of Science in Business Administration</h3>
<div class="photobox"><img class="image-left" src="images/bsba.jpg" width="302" height="200" alt="" />
<p>This accelerated 128-credit hour business program gives you the essentials in the business field. Your degree is organized into three parts: Core Requirements, the Business Major, and free electives. Core Requirements include courses from the liberal arts disciplines. This guarantees uniformity of study without sacrificing your educational interests.</p>
</div>
我希望这对每个人都足够清楚。
谢谢!
编辑:
感谢您尝试每个人。我尝试了你们所建议的一切,但我无法完成它的工作。这对我来说太过分了。每次添加内容或改变内容时,都会在页面上打破其他内容。
我只是告诉他们,他们将不得不离开,直到他们雇用新的人。
很多很多,谢谢。
每个手风琴部件是否都有自己的箭头来表示哪个部分是开放的,哪个部分是关闭的? – HisPowerLevelIsOver9000
我没有时间键入完整的答案,但这是使用纯CSS的方式。如果您需要使用图像而不是字符,请在span上使用background-image属性,而不要使用:: next内容上的字符。 http://jsfiddle.net/thePivottt/574a2grb/1/ –