gpt4 book ai didi

javascript - 将 Bootstrap 选项卡栏转换为移动尺寸的 Accordion 菜单

转载 作者:行者123 更新时间:2023-11-28 18:46:46 24 4
gpt4 key购买 nike

有没有办法在不添加插件的情况下将 Bootstrap 选项卡栏转换为移动尺寸的 Accordion ?

Bootstrap 垂直选项卡示例: http://www.bootply.com/74926

最佳答案

此代码将帮助其正常工作只需添加 BootStrap 和 Jquery 文件的 CDNS

<div class="container">
<div class="row">
<div class="col-md-6">
<h3>Tabs</h3>
<!-- tabs -->

<div class="tabbable" id="accordion">
<ul class="nav nav-tabs">
<li><a data-toggle="collapse" data-parent="#accordion" href="#collapse1">Collapsible Group 1</a></li>
<li><a data-toggle="collapse" data-parent="#accordion" href="#collapse2">Collapsible Group 2</a></li>
<!--<li><a href="#twee" data-toggle="collapse" data-parent="#accordion" data-target="#twee">Twee</a></li>-->
</ul>


<div class="panel panel-default">

<div id="collapse1" class="panel-collapse collapse in">
<div class="panel-body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
</div>

<div class="panel panel-default">

<div id="collapse2" class="panel-collapse collapse">
<div class="panel-body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
</div>

</div>
<!-- /tabs -->

</div>

</div><!-- /row -->

</div>

关于javascript - 将 Bootstrap 选项卡栏转换为移动尺寸的 Accordion 菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35193963/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com