我有一個菜單,其中有很多選項,其想法是使用滾動按鈕來導航左側或右側(就像在YouTube上查看您的播放列表),由JQuery控制。我需要關於如何創建一個功能支持任何新條目而不失去其功能的想法或建議。 到目前爲止,我嘗試過的所有功能都能正常工作,但無法應付新的選項或新添加的鏈接。下面是代碼和CSS,任何建議都非常值得歡迎。爲菜單/導航欄製作滾動按鈕
HTML:
<body>
<div id="menu-new">
<ul class="menu">
<li class="sep">
<a href="/askthewizard/">Ask The Wizard</a>
</li>
<li>
<a href="/newreleases/">New Releases</a>
</li>
<li>
<a href="/casestudies/">Case Studies</a>
</li>
<li class="sep">
<a href="/maintenance/">Maintenance</a>
</li>
<li>
<a href="/schedule/">Schedule</a>
</li>
<li>
<a href="/timeclock/">Time Clock</a>
</li>
<li>
<a href="/payroll/">Payroll</a>
</li>
<li class="sep">
<a href="/humanresources/">Human Resources</a>
</li>
<li>
<a href="/application/">Application</a>
</li>
<li>
<a href="/other/">Other</a>
</li>
</ul>
</div>
</body>
CSS:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5,
h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong,
sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label,
legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0 none;
font-family: inherit;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0 none;
padding: 0;
vertical-align: baseline;
}
#menu-new {
overflow: hidden;
padding: 5px;
background-color: #9A1C1C;
border: 1px solid #000000;
text-align: center;
}
#menu-new ul.menu {
list-style: none outside none;
width: 960px;
display: block;
margin: 0 auto;
}
#menu-new ul.menu li:first-child {
margin: 0;
}
#menu-new ul.menu li.sep {
border-right: 1px solid #000000;
padding: 0 12px 0 0;
}
#menu-new ul.menu li {
float: left;
margin: 0 0 0 12px;
}
#menu-new ul.menu li a {
color: #D9D8B5;
display: block;
font: bold 11px/30px 'Arial',sans-serif;
padding: 0 8px;
text-decoration: none;
text-shadow: 0 1px 0 #460100;
text-transform: uppercase;
}
a:link, a:visited {
color: #9A1C1C;
text-decoration: none;
}
a {
outline: 0 none;
}
#menu-new ul.menu li a:hover, #menu-new ul.menu li a.active {
background-color: #DDDCBE;
border-radius: 1px 1px 1px 1px;
box-shadow: 0 0 2px #222222;
color: #742C2B;
text-shadow: 0 1px 0 #FFFFFF;
}
其實多虧了事實沒有人迴應,我發現了一個很好的方法來自己做。 無論如何,謝謝你的努力。 Hvala :) – Inexorable