我有一个jqueryUI手风琴,看起来很棒。我将有大约10个部分(标题),它们将适合屏幕。但是,在较小的屏幕上,它会切断我的部分标题。 (我已经可以通过缩小浏览器窗口来模拟这个)。如果手风琴标题不垂直,我怎么能出现滚动条?
手风琴包裹在没有选项设置的div中。这就好像需要一个MIN高度的div来确保所有标题都可以出现,并为部分内容留出一些空间。
我的完整代码如下:
<script>
$(function() {
$( "#settingsnavigation" ).accordion({
heightStyle: "fill",
clearStyle: true,
autoHeight: false }
);
});
</script>
<div id="settingsnavigation" style="width:220px">
<h3>General</h3>
<div>
<div class="settingsubsection">User</div>
<div class="settingsubsection">Security</div>
<div class="settingsubsection">Units & Ranges</div>
<div class="settingsubsection">Notifications</div>
<div class="settingsubsection">Vehicles</div>
<div class="settingsubsection">Device</div>
</div>
<h3>Financial</h3>
<div>
<div class="settingsubsection">Balance</div>
<div class="settingsubsection">History</div>
<div class="settingsubsection">Purchase</div>
</div>
<h3>Vehicle: Cadillac Seville STS</h3>
<div>
<div class="settingsubsection">General</div>
<div class="settingsubsection">Units & Ranges</div>
<div class="settingsubsection">Select Reminders</div>
<div class="settingsubsection">Edit Reminders</div>
</div>
</div>
答案 0 :(得分:0)
容器div的CSS应为
overflow: auto;