我根据http://jqueryui.com/accordion/#custom-icons实现了一个简单的 JQuery 手风琴小部件
出于某种原因,下拉图标 (ui-icon) 位于我的部分标题文本中:
有没有其他人经历过这个?
html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Accordion - Default functionality</title>
</head>
<body>
<div id="accordion">
<h3>Section 1</h3>
<div>
<p>
Mauris mauris ante...shortened.
</p>
</div>
<h3>Section 2</h3>
<div>
<p>
Sed non urna...shortened.
</p>
</div>
<h3>Section 3</h3>
<div>
<p>
Nam enim risus...(shortened).
</p>
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item three</li>
</ul>
</div>
<h3>Section 4</h3>
<div>
<p>
Cras dictum....(shortened).
</p>
<p>
Suspendisse eu nisl...(shortened).
</p>
</div>
</div>
</body>
</html>
CSS:
body {
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
font-size: 62.5%;
}
javascript:
$("#accordion").accordion();
谢谢!